Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(client): intellisense type shapes #20319

Merged
merged 3 commits into from
Jul 21, 2023
Merged

Conversation

millsp
Copy link
Member

@millsp millsp commented Jul 20, 2023

Gets rid of the GetResult by forcing the evaluation of the types on the results. This cannot be tested easily because the types are purely equivalent and it's only a visual change in intellisense, so I left a comment in the code.

Before:
Screenshot from 2023-07-20 13-16-02

After:
Screenshot from 2023-07-20 13-15-31

An unrelated PR about performance will get rid of the extra & {}, so it will be easier to read than just the current fix. Keeping the PRs separate on purpose, although there's some overlap.

closes #20320
closes https://github.com/prisma/team-orm/issues/228

@millsp millsp requested a review from a team as a code owner July 20, 2023 23:16
@millsp millsp requested review from Jolg42 and aqrln and removed request for a team July 20, 2023 23:16
@millsp millsp added this to the 5.1.0 milestone Jul 20, 2023
@millsp millsp requested a review from SevInf July 20, 2023 23:36
@codspeed-hq
Copy link

codspeed-hq bot commented Jul 20, 2023

CodSpeed Performance Report

Merging #20319 will degrade performances by 30.98%

Comparing fix/client/intellisense-type-shape (8692910) with main (8bcd1ee)

Summary

❌ 1 regressions
✅ 3 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark main fix/client/intellisense-type-shape Change
typescript compilation ~50 Models 56.6 ms 82.1 ms -30.98%

@millsp millsp merged commit ae2147a into main Jul 21, 2023
59 of 62 checks passed
@millsp millsp deleted the fix/client/intellisense-type-shape branch July 21, 2023 16:30
jbranchaud added a commit to skillrecordings/products that referenced this pull request Dec 28, 2023
https://github.com/prisma/prisma/releases/tag/5.2.0

Both the 5.1.0 and 5.2.0 upgrades didn't require any changes on our
part. They both add improvements in performance by reducing unnecessary
queries to the database. And 5.1.0 introduces better type resolution for
intellisense (prisma/prisma#20319).
kodiakhq bot pushed a commit to skillrecordings/products that referenced this pull request Jan 3, 2024
https://github.com/prisma/prisma/releases/tag/5.2.0

Both the 5.1.0 and 5.2.0 upgrades didn't require any changes on our
part. They both add improvements in performance by reducing unnecessary
queries to the database. And 5.1.0 introduces better type resolution for
intellisense (prisma/prisma#20319).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hovering over types (intellisense) shows confusing GetResult
2 participants