devtypes - v2.0.0
    Preparing search index...

    Type Alias AssertRecord<T>

    AssertRecord: T

    Assert that a type is a Record.

    Type Parameters

    • T extends Record<string | number | symbol, any>

      Type that must be a record

    Ensures the type is indexable by string, number, or symbol keys. Useful for validating dictionary-like structures.

    type A = AssertRecord< Record< string, number > >;  // ✓
    type B = AssertRecord< { a: number } >; // ✓
    type C = AssertRecord< string >; // ✗ TS error