question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeScript types are not reloaded in editors

See original GitHub issue

When 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:closed
  • Created 3 years ago
  • Reactions:5
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
Jolg42commented, May 31, 2021

@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

2reactions
carmenberndtcommented, Jul 28, 2020

This issue is fixed by https://github.com/prisma/language-tools/pull/357 for VSCode.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found