Raul Fernandez
Raul Fernandez6mo ago

Why am I getting 'Argument type is not assignable to parameter type ProcedureResolver<unknown>'?

I have this warning in my editor (jetbrains InteliJ):
Argument type () => any[] is not assignable to parameter type ProcedureResolver<unknown, unknown, unknown, unknown, unknown, unknown>
Argument type () => any[] is not assignable to parameter type ProcedureResolver<unknown, unknown, unknown, unknown, unknown, unknown>
I am using: - Node V20.10.0 - pnpm 8.15.1 - trpc client/server 11.0.0-next-beta.257
No description
3 Replies
Nick
Nick6mo ago
That’s an interesting one, might be an inference bug. I’d suggest doing a minimal reproduction in a stackblitz and opening a issue with it in
Raul Fernandez
Raul Fernandez6mo ago
@Nick Lucas You can use the t3 turbo repo as reproduction, has the same warnings, you can find my bug report here: https://github.com/trpc/trpc/issues/5437
GitHub
bug: Argument type () => any[] is not assignable to parameter type ...
Provide environment information System: OS: Windows 11 10.0.22631 CPU: (24) x64 13th Gen Intel(R) Core(TM) i7-13700K Memory: 11.69 GB / 31.77 GB Binaries: Node: 20.10.0 - C:\Program Files\nodejs\no...
Raul Fernandez
Raul Fernandez6mo ago
I fixed it! Turns out my node_modules folder was excluded in the project settings, so it couldn't recognize the typings. All good now! In case anyone wants to read more about this issue: https://youtrack.jetbrains.com/issue/RIDER-97380/Argument-type-void-is-not-assignable-to-parameter-type-PushSubscriptionOptionsInit-undefined
More Posts