Type Error on queryTypes.ts file.
imyasha opened this issue · comments
I used @mswjs/data
on my project and would like to build it
but I got this error.
[build:*types] node_modules/@mswjs/data/lib/query/queryTypes.d.ts(29,75): error TS2344: Type 'EntityType' does not satisfy the constraint 'AnyObject'.
Released: v0.11.2 🎉
This has been released in v0.11.2!
Make sure to always update to the latest version (npm i @mswjs/data@latest
) to get the newest features and bug fixes.
Predictable release automation by @ossjs/release.
After upgrading to 0.11.2, one of the two errors still remain. Aren't they related?
node_modules/@mswjs/data/lib/query/queryTypes.d.ts:42:276 - error TS2344: Type 'ItemType' does not satisfy the constraint 'AnyObject'.
42 export declare type GetQueryFor<ValueType extends any> = ValueType extends string ? StringQuery : ValueType extends number ? NumberQuery : ValueType extends Boolean ? BooleanQuery : ValueType extends Date ? DateQuery : ValueType extends Array<infer ItemType> ? QuerySelector<ItemType>['where'] : ValueType extends Value<any, any> ? QuerySelector<ValueType>['where'] : never;
~~~~~~~~
That's right.
Not solved and this issue should be open again.