devtypes - v2.0.0
    Preparing search index...

    Type Alias AssertBoolean<T>

    AssertBoolean: T

    Assert that a type resolves to a boolean.

    Type Parameters

    • T extends boolean

      Type that must be true or false

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

    type A = AssertBoolean< true >;    // ✓
    type B = AssertBoolean< string >; // ✗ TS error