Function indexSignatureFromArray

  • Creates an index signature from the given array.

    Type Parameters

    • T

    Parameters

    • array: T[]

      The array to convert.

    • idExtractor: ((element) => string)

      A function to extract the id from each array elements.

        • (element): string
        • Parameters

          • element: T

          Returns string

    Returns {
        [id: string]: T;
    }

    the created index signature.

    • [id: string]: T

Generated using TypeDoc