TypeScript Intellisense is incredibly slow
I recently scaffolded a t3 app (manually, existing codebase) and found that the TypeScript Intellisense is incredibly slow. I am on a Macbook Air M1, and the only other thing running in the background is a Docker container housing a Postgres server.
This makes it really hard to use TypeScript because I have to wait 10 seconds to get any autocomplete or intellisense. Copilot outpaces TypeScript by a good 5 seconds.
I did some reading and heard that this could be caused by zod, but wanted to ask here first to see if anyone else has had similar problems.
Here is my
tsconfig.json
, if that matters:
If you need a list of my extensions or something similar, let me know.10 Replies
Try turning off all extensions and see if it gets faster, then you can turn them on one by one to debug
I have an almost identical
tsconfig.json
and no issues 🤔I’ve solved this and the problem was that strict was set to false.
Does anybody know why, or workarounds so I can set it to false again.
imo you should have strict set to true in all cases.
its your punishment for setting strict to false
you should never set string to false
especially in a t3 app where trpc requires you to have strict mode on
I have this exact some problem! Its so bad.,.. using Zod and Prisma-zod generator and man...it just stays in a loading state. I dont like this...any work around?
Could it be the latest version of vscode causing problems?
Project references, avoiding using zod’s .extend, .omit, and .pick can help
Also set ur vscode typescript version to latest
Hmmm… I need to investigate prisma-zod schema generator. It generates like 100 schema files.
Ok I’ll try that.
It’s probably the generator lol
Ya I need to figure it out by removing it and see if it solves it.