Type guard that checks if a value is not a bigint.
Type Narrowing Behavior:
bigint
true
The type of the input value
The value to check
true if u is not a bigint, false otherwise. When true, TypeScript excludes bigint from the type.
u
false
const values: unknown[] = [1n, 2, 3n];const nonBigints = values.filter(isNotBigint);assert.deepStrictEqual(nonBigints, [2]); Copy
const values: unknown[] = [1n, 2, 3n];const nonBigints = values.filter(isNotBigint);assert.deepStrictEqual(nonBigints, [2]);
Type guard that checks if a value is not a bigint.
Type Narrowing Behavior:
bigint
from the input type whentrue