Replies: 1 comment 3 replies
-
|
Have you ran tsc with diagnostics on to figure out what's causing the slowdown? Also, are you relying on a build step first to generate the types? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
https://colinhacks.com/essays/live-types-typescript-monorepo (option 5)
Recently my typescript monorepo constructed in the manner of
packemontsconfig.pathsandtsconfig.referencesIt ran into an issue of typescript just failing to return intellesense data in a timely manner (read: immediately)
my setup is rougly like:
inside
user.table.tsI had my drizzle table and i was using drizzle-zod to generate insert/update/select zod schemas (I also migrated to arktype but that didn't solve my issue).Trying to import the user zod schemas into my
user.routes.tsresulted in having to wait (in most cases), 2-3minutes for intellisense information to appear in the mouse over tooltip (outrageous).userRoutesends up being used to create client side types for hono rpc browser client, so the zodValidator/arktypeValidator is pretty important.Things I noticed:
user.routes.tsfile, intellisense is near-instant.@workspace/service-dbin theapp-one/package.json, this now requires amoon service-db:buildevery time i make a change inservice-db(not really what i want to be doing). and in the end, my intellisense problem is still there. (I had thought that direct source file inference was the cause of slowdown.user.routes.ts)user.routes.tsand only import theUserTableclass from@workspace/service-db, again... does not solve the problem.Note
It feels like the problem has some kind of relation to the import boundary?
The point
https://colinhacks.com/essays/live-types-typescript-monorepo (option 5)
Would this speed things up?
what could be causing this dramatic slow down?
Beta Was this translation helpful? Give feedback.
All reactions