vtils

Home > types > Negative

Negative type

A negative number/bigint (-∞ < x < 0)

Use-case: Validating and documenting parameters.

Signature:

export declare type Negative<T extends Numeric> = T extends Zero ? never : `${T}` extends `-${string}` ? T : never;