devtypes - v1.1.0
    Preparing search index...

    Type Alias IsKeyedList<L>

    IsKeyedList: L extends Record<any, any>
        ? true
        : L extends Map<any, any> ? true : false

    Test whether a list-like structure is keyed.

    Type Parameters

    • L

      List-like type

    1.1.0

    Returns true for records and maps, false otherwise.

    type A = IsKeyedList< Record< string, number > >; // true
    type B = IsKeyedList< Map< number, string > >; // true
    type C = IsKeyedList< number[] >; // false