TypeScript types are not reloaded in editors
See original GitHub issueWhen changing the schema and regenerating the client, VSCode and other editors don’t pick up the change in the TypeScript types. This is not necessarily a bug in Prisma, but it significantly affects the developer experience.
Reproduction
mkdir repro
cd repro
npx @timsuchanek/auto prisma
// open vscode and open main.ts
// edit schema.prisma
// run prisma generate
// types are not updated
// try to trigger reload by hand like so:
rm -rf node_modules && yarn
// now PrismaClient is even typed `any`
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Monaco-Editor: Adding Typescript Type Declarations not ...
I try to add Typescript Type declarations afterwards. However, the editor does not take this over. What am I doing wrong?
Read more >Documentation - Creating .d.ts Files from .js files - TypeScript
This set up means you can own the editor experience of TypeScript-powered editors without porting your ... No “types” field, checks “main”, then...
Read more >Documentation - TypeScript 4.5
TypeScript often needs to gracefully fail when it detects possibly infinite recursion, or any type expansions that can take a long time and...
Read more >Documentation - TypeScript 3.8
TypeScript 3.8 adds a new syntax for type-only imports and exports. ... A type-only import can specify a default import or named bindings,...
Read more >TSConfig Reference - Docs on every TSConfig option
The configuration from the base file are loaded first, then overridden by ... In some cases where no type annotations are present, TypeScript...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@pantharshit00 I think this still happens with VS Code but is solved by using the Prisma extension: https://marketplace.visualstudio.com/items?itemName=Prisma.prisma
This issue is fixed by https://github.com/prisma/language-tools/pull/357 for VSCode.