Function indexSignatureFilter

  • Filters out all entries from the given index signature that doesn't match the given predicate.

    Type Parameters

    • T

    Parameters

    • indexSignature: {
          [id: string]: T;
      }

      The index signture to filter.

      • [id: string]: T
    • filter: ((id, element) => boolean)

      Predicate to filter the entries.

        • (id, element): boolean
        • Parameters

          • id: string
          • element: T

          Returns boolean

    Returns {
        [id: string]: T;
    }

    an index signature containing only the element that match the given predicate.

    • [id: string]: T

Generated using TypeDoc