Skip to content

Conversation

@asjir
Copy link

@asjir asjir commented Oct 24, 2024

For some reason, type inference on this file fails during build step. Which means that if this code is put in a monorepo and becomes part of a package, the client.d.ts file doesn't get generated, and when trpc is imported, the whole type inference gets lost.

This little (mostly) documentation fix will ensure that people who come to tRPC-sveltekit, and copy code from the docs, will never encounter this issue.

For some reason, type inference on this file fails during build step. Which means that if this code is put in a monorepo and becomes part of a package, the .d.ts file doesn't get generated, and when trpc is imported, the whole type inference gets lost. This little (mostly) documentation fix will ensure that people who come to tRPC-sveltekit, and copy code from the docs, will never encounter this issue.
@codesandbox
Copy link

codesandbox bot commented Oct 24, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant