devtypes - v2.0.0
    Preparing search index...

    Type Alias AssertTrue<T>

    AssertTrue: T

    Assert that a boolean type resolves to true.

    Type Parameters

    • T extends true

      Boolean type that must be true

    Produces a compiler error if the provided type is not exactly true.

    type A = AssertTrue< true >;   // ✓
    type B = AssertTrue< false >; // ✗ TS error