@juulsgaard/ts-tools
    Preparing search index...

    Class ReadonlyLookup<TKey, TVal>

    An immutable collection where each key is unique but has a list of values

    Type Parameters

    • TKey
    • TVal

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    map: Map<NonNullable<TKey>, TVal[]> = ...
    noKey: TVal[] | undefined

    Accessors

    • get hasNullKey(): boolean

      Return true if the lookup contains a nullish key

      Returns boolean

    Methods

    • Create iterator for values with a non-null key

      Returns MapIterator<[key: NonNullable<TKey>, values: TVal[]]>

    • Create an array containing the keys and values in the lookup. Excludes nullable keys

      Parameters

      • excludeNullKeys: true

        Exclude nullable keys when true

      Returns [key: NonNullable<TKey>, values: TVal[]][]

    • Create an array containing the keys and values in the lookup.

      Parameters

      • OptionalexcludeNullKeys: boolean

        Exclude nullable keys when true

      Returns [key: LookupKey<TKey>, values: TVal[]][]