question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: error TS2344: Type 'TInputContext' does not satisfy the constraint 'Record<string, any>'.

See original GitHub issue

Provide 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:closed
  • Created a year ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
nohumcommented, Sep 20, 2022

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).

0reactions
github-actions[bot]commented, Oct 7, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found