Generic type variables

The `Minimum` primitive wrapper object generic type variables

Minimum<Value>

Valueextendsnumber

​A generic type variable constrained by the number, by default of the value captured from the supplied value indicates the primitive value type of a new Minimum instance.

minimum.class.ts
class Minimum<
  Value extends number // <--- Declare generic type variable Value.
> extends Inequality<Value> {
  constructor(
    value: Value // <--- Capture generic type variable Value.
  ) {
    super(value);
  }
}

Last updated