5.0.0-rc.0

NumberBetween

NumberBetween<Min, Max, Type>

A number type or an instance of Number between a specified range takes generic type variable Min and Max constrained by number type as range, and takes generic type variable Type constrained by generic type AnyNumber as the type.

number-between.type.ts
type NumberBetween<
  Min extends number,
  Max extends number,
  Type extends AnyNumber = number
> = Type & MinMax<Min, Max>;

Generic type variables

Minextendsnumber

A generic type variable Min constrained by the number type indicates the minimum range of the generic type variable Type.

Maxextendsnumber

A generic type variable Min constrained by the number type indicates the maximum range of the generic type variable Type.

TypeextendsAnyNumber=number

A generic type variable Type constrained by generic type AnyNumber indicates number type.

Last updated