Type alias Integer<N>

Integer<N>: IfEquals<IsInteger<N>, true, N, never>

Represents an integer type. This type is used to ensure that a numeric value is an integer.

Example use case:

export function myFunc<T extends Numeric>(a: Integer<T>) {
console.log(a);
}
const good = myFunc(4545); // This is valid as 4545 is an integer.
const bad = myFunc(4545.554); // This will throw an error as 4545.554 is not an integer.

Type Parameters