-
Notifications
You must be signed in to change notification settings - Fork 10
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
TS emits an error for BoolQuery type #100
Comments
Hey thanks for opening this issue, I'm happy to take a look! I think there may be additional code affecting those types. For instance, the TypeScript error mentions an If I paste your example into the test in So the key is probably looking more into what defines |
Hi, guys... I was facing the same error and noticed this happens when I ran this command |
Ah, nice find @mgonzalez121690, yeah if you take a look at the very bottom of https://unpkg.com/browse/@types/chai@4.2.17/index.d.ts, it looks like the chai types are adding a I'm not sure there's anything we can do about that here, chai adding that property to all object types is very broad. Most likely if you still want to include tsconfig.json {
"compilerOptions": {
"types": [] // or ["node"] etc, basically a list of global types to evaluate
}
} tsconfig.test.json {
"compilerOptions": {
"types": ["chai"] // or ["node", "chai"] etc
}
} |
I'm going to close this issue, but let me know if the above helps or if you're still experiencing issues! |
Yeah, it's a case with // global.d.ts
interface Object {
should?: any
} |
TS expects a
should
property, despite it being an optional prop inBoolQueryConfig
:Doesn't work:
TS error:
Works:
TS version:
4.0.3
The text was updated successfully, but these errors were encountered: