fix: updating the type narrowing function

This commit is contained in:
Kevin Nadro
2025-01-30 19:55:04 -06:00
parent f7ab29047c
commit 259844ef11

View File

@ -73,7 +73,13 @@ export function isBinaryExpression(e: any): e is BinaryExpression {
}
export function isLiteralValueNotStringAndBoolean(
e: any
e: LiteralValue
): e is { value: number; suffix: NumericSuffix } {
return e && 'value' in e && 'suffix' in e
return (
typeof e !== 'string' &&
typeof e !== 'boolean' &&
e &&
'value' in e &&
'suffix' in e
)
}