🐛 Bug: isFalsyType should return true for 0n
#544
Labels
status: accepting prs
Please, send a pull request to resolve this! 🙏
type: bug
Something isn't working :( 🐛
Bug Report Checklist
main
branch of the repository.Expected
given the literal
0n
type,isFalsyType(type)
should be true.Actual
isFalsyType(type)
is false.Additional Info
This is because the ts api returns a
PseudoBigInt
object (rather than abigint
primitive) which is always truthy, causing this check to be incorrect:ts-api-utils/src/types/utilities.ts
Lines 49 to 51 in 41cd21d
See also https://github.com/typescript-eslint/typescript-eslint/pull/10205/files
The text was updated successfully, but these errors were encountered: