TS's type.isLiteral() is bugged before TS v5.0 and won't return true for bigint literals. Use this function instead if you need to check for bigint literals in TS versions before v5.0. Otherwise, you should just use type.isLiteral().
type.isLiteral()
true
See https://github.com/microsoft/TypeScript/pull/50929
TS's
type.isLiteral()
is bugged before TS v5.0 and won't returntrue
for bigint literals. Use this function instead if you need to check for bigint literals in TS versions before v5.0. Otherwise, you should just usetype.isLiteral()
.See https://github.com/microsoft/TypeScript/pull/50929