bug: error TS2344: Type 'TInputContext' does not satisfy the constraint 'Record<string, any>'.
See original GitHub issueProvide environment information
System:
OS: Linux 5.18 undefined
CPU: (6) x64 Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz
Memory: 27.53 GB / 31.30 GB
Container: Yes
Shell: 5.1.16 - /bin/bash
Binaries:
Node: 16.16.0 - ~/.nvm/versions/node/v16.16.0/bin/node
npm: 8.11.0 - ~/.nvm/versions/node/v16.16.0/bin/npm
Browsers:
Firefox: 101.0.1
npmPackages:
@trpc/server: ^10.0.0-proxy-alpha.72 => 10.0.0-proxy-alpha.72
Describe the bug
node_modules/@trpc/server/dist/deprecated/interop.d.ts(58,237): error TS2344: Type 'TInputContext' does not satisfy the constraint 'Record<string, any>'.
node_modules/@trpc/server/dist/deprecated/router.d.ts(188,30): error TS2344: Type 'TInputContext' does not satisfy the constraint 'Record<string, any>'.
To reproduce
tsc && node dist/index.js
Issue Analytics
- State:
- Created a year ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
types/lodash error TS2344: Type 'K' does not satisfy ... - GitHub
ts:234:132 - error TS2344: Type 'K' does not satisfy the constraint 'string'. Type 'string | number | symbol' is not assignable to type...
Read more >Error TS2344: Type 'T[K]' does not satisfy the constraint
You have to set some options in tsconfig.json. The errors are from node_modules/@angular/fire/angularfire2.d.ts. tsconfig: { //.
Read more >Confusion in why a "type" is valid but not an "interface ... - Reddit
And error message: Type 'RootStackParamList_Interface' does not satisfy the constraint 'ParamListBase'. Index signature for type 'string' is ...
Read more >TypeScript errors and how to fix them
Alternatively, you can write your function implementation inside a source code file ( *.ts ). TS1192. error TS1192: Module ' json5 ' has...
Read more >Documentation - Utility Types - TypeScript
type T6 = Parameters < string >;. Type 'string' does not satisfy the constraint '(...args: any) => any'.
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 Free
Top 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

I have fixed this issue in a PR, see the PR for instructions to reproduce.Nevermind, the tests failed, but we found out that the error went away because our imports were wrong (e.g. importing from@trpc/server/dist/...instead of@trpc/server).This issue has been locked because it had no new activity for 14 days. If you are running into a similar issue, please create a new issue. Thank you.