La grande muraille
La grande muraille
TtRPC
Created by La grande muraille on 7/21/2023 in #❓-help
Losing type inference in vs-code
Hey, I'm having quite some trouble with type inference today. I create my client inside of function that returns it with
createTRPCProxyClient<AppRouter>()
createTRPCProxyClient<AppRouter>()
I can clearly see the type of the client object inside of the function. Most of the times after importing and calling my function from another file, I can't see the type anymore... What's even more interesting is that IntelliSense does show the paths... Sometimes I can see the type for a few seconds but this is really rare. It seems the typescript lsp in not working correctly, it's the only thing i could think of, do you have any ideas of what's happening ? Version : - Node : 20.3.0 - tsc : 5.1.6 - @trpc/client && @trpc/server : 10.35.0 The Front-end is a SvelteKit project if this can change anything...
4 replies