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
This is a problem cause it triggers eslint rule about promises having to be awaited, and each check in the tests gets the warning even when it is not actually dealing with a promise but merely with an inferred type.
This could happen because of the order of the check overloads, having the promise based ones before the others.
Check:
Why such ordering is necessary, eventually if inverted what would stop working properly (I suspect await check(async () => ..., is.throwing(...))
If it's possible to use a negated promise type to force typescript to use another overload unless the method is really really returning a promise
The text was updated successfully, but these errors were encountered:
When writing something like the following:
Typescript will infer this signature:
Because it will for some reason infer:
This is a problem cause it triggers eslint rule about promises having to be awaited, and each
check
in the tests gets the warning even when it is not actually dealing with a promise but merely with an inferred type.This could happen because of the order of the
check
overloads, having the promise based ones before the others.Check:
await check(async () => ..., is.throwing(...))
The text was updated successfully, but these errors were encountered: