You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After updating from TypeScript 4.1.5 to 4.2.2 msw can no longer be type-checked with tsc --noEmit.
node_modules/msw/lib/types/utils/internal/compose.d.ts(6,65):
error TS2344: Type 'PickLastInTuple<T>' does not satisfy the constraint '(...args: any) => any'.
Type 'unknown' is not assignable to type '(...args: any) => any'.
I don't think I even use that type, but because it is included in msw/index.d.ts TypeScript wants it to pass :/
Environment
msw: 0.26.2
nodejs: 14.13.0
npm: 7.5.4
typescript: 4.2.2
To Reproduce
Steps to reproduce the behavior:
Install msw@0.26.2 and typescript@4.2.2
Create a file that imports anything from msw
Try to type-check said file with tsc --noEmit
Expected behavior
TypeScript can type-check msw, in specific PickLastInTuple<T>
The text was updated successfully, but these errors were encountered:
type ParametersOrNot<T> = T extends (...args: any[]) => any ? Parameters<T> : never;
declare type FirstFnParameterType<T extends any[]> = ParametersOrNot<PickLastInTuple<T>>[any];
Describe the bug
After updating from TypeScript 4.1.5 to 4.2.2
msw
can no longer be type-checked withtsc --noEmit
.I don't think I even use that type, but because it is included in
msw/index.d.ts
TypeScript wants it to pass :/Environment
msw: 0.26.2
nodejs: 14.13.0
npm: 7.5.4
typescript: 4.2.2
To Reproduce
Steps to reproduce the behavior:
msw@0.26.2
andtypescript@4.2.2
msw
tsc --noEmit
Expected behavior
TypeScript can type-check
msw
, in specificPickLastInTuple<T>
The text was updated successfully, but these errors were encountered: