devtypes - v2.0.0
    Preparing search index...

    Type Alias AssertSymbol<T>

    AssertSymbol: T

    Assert that a type resolves to a symbol.

    Type Parameters

    • T extends symbol

      Type that must be a symbol

    Produces a compiler error if the provided type is not a symbol. Useful for validating symbol-based APIs at compile time.

    type A = AssertSymbol< symbol >;  // ✓
    type B = AssertSymbol< string >; // ✗ TS error