tsutils
tsutils copied to clipboard
Add is*Type for newer types such as BigInt and TemplateLiteral?
In https://github.com/typescript-eslint/typescript-eslint/pull/4378/files#diff-b7600c047aa2f2fb16eafae5010267ecc7e6ab19a7a165d6a4cb860ffc0dfffa, I added the following functions:
export function isTypeBigIntLiteralType(
type: ts.Type,
): type is ts.BigIntLiteralType {
return isTypeFlagSet(type, ts.TypeFlags.BigIntLiteral);
}
export function isTypeTemplateLiteralType(
type: ts.Type,
): type is ts.TemplateLiteralType {
return isTypeFlagSet(type, ts.TypeFlags.TemplateLiteral);
}
For these types and presumably other new types, would you accept a PR adding them in? 🌹