Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type Error on queryTypes.ts file. #250

Closed
imyasha opened this issue Nov 17, 2022 · 3 comments · Fixed by #251
Closed

Type Error on queryTypes.ts file. #250

imyasha opened this issue Nov 17, 2022 · 3 comments · Fixed by #251

Comments

@imyasha
Copy link
Contributor

imyasha commented Nov 17, 2022

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'.
@kettanaito
Copy link
Member

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.

@micha149
Copy link

micha149 commented Feb 3, 2023

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;
                                                                                                                                                                                                                                                                                      ~~~~~~~~

@imyasha
Copy link
Contributor Author

imyasha commented Feb 3, 2023

That's right.
Not solved and this issue should be open again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants