Type error in @trpc/server with TS 4.6
See original GitHub issueHi @KATT,
Thank you for this great library.
I am reporting that the server types need updates after the latest typescript release (4.6):
node_modules/@trpc/server/dist/declarations/src/TRPCError.d.ts:7:14 - error TS2416: Property 'cause' in type 'TRPCError' is not assignable to the same property in base type 'Error'.
Type 'unknown' is not assignable to type 'Error | undefined'.
7 readonly cause?: unknown;
~~~~~
Found 1 error in node_modules/@trpc/server/dist/declarations/src/TRPCError.d.ts:7
Best regards
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Upgrade to TypeScript `4.6` · Issue #1600 · trpc/trpc
The project builds fine when updating the typescript-version, but there is some issue introduced in 4.5 that stops one of the tests. See...
Read more >Documentation - TypeScript 4.6
In TypeScript, it was previously an error to contain any code at the beginning of a constructor if its containing class had any...
Read more >TypeScript 4.6 Beta Improves Type Inference and Error ...
In TypeScript, it was previously an error to contain any code at the beginning of a constructor if its containing class had any...
Read more >TypeScript 4.6.4 is indicating that this code is not valid
Type 'null' is not assignable to type 'string'. I added the // @ts-ignore but WebStorm is complaining that there is an error. javascript ......
Read more >TypeScript errors and how to fix them
error TS1371: This import is never used as a value and must use 'import type' because 'importsNotUsedAsValues' is set to 'error'. Broken Code...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For people running into this (skipLibCheck strangely doesn’t work), change lib option in tsconfig to ES2021 (instead of ESNext/ES2022)
You probably want to enable
skipLibCheck
. I’ll have a look at this when I can