devtypes - v2.0.0
    Preparing search index...

    Type Alias AssertNumber<T>

    AssertNumber: T

    Assert that a type resolves to a number.

    Type Parameters

    • T extends number

      Type that must be a number

    Produces a compiler error if the provided type is not a number.

    type A = AssertNumber< number >;   // ✓
    type B = AssertNumber< boolean >; // ✗ TS error