Utility type guard for validating finite numeric values.
function IsFiniteNumber(value: unknown): value is number;
The IsFiniteNumber() function is a small utility helper that checks whether a given value is a finite JavaScript number.
It performs two validations:
numberNaN, Infinity, or -Infinity)Because it is implemented as a TypeScript type guard, this function also provides compile-time narrowing when used in conditional statements.
This helper is commonly used for validating DSP parameters and preventing unstable numeric values from propagating into audio processing logic.
value: unknown – The value to be validated.boolean –
true if the value is a finite numberfalse otherwiseWhen returning true, TypeScript will narrow value to type number.
This function does not emit any errors or warnings.