Options
All
  • Public
  • Public/Protected
  • All
Menu
     

Interface Array<T>

Type parameters

  • T

Hierarchy

  • Array

Index

Properties

Methods

Properties

last

last: T

Set/Gets the last item in this Array.

Methods

max

  • max(by: function): T
  • Determines the maximum value of an Array given specified criteria.

    Parameters

    • by: function

      A callback that yields the property/value of the items to compare during the sort.

        • (item: T): T
        • Parameters

          • item: T

          Returns T

    Returns T

min

  • min(by: function): T
  • Determines the minimum value of an Array given specified criteria.

    Parameters

    • by: function

      A callback that yields the property/value of the items to compare during the sort.

        • (item: T): T
        • Parameters

          • item: T

          Returns T

    Returns T

has

  • has(val: T): boolean
  • Determines if this Array contains the specified value.

    Parameters

    • val: T

      The value to search

    Returns boolean

repeat

  • repeat(match: number | T[], strict?: boolean): Array<T>
  • Converts this Array into one that matches the length specified by the argument, match. If this Array has items, they are repeated until the specified length is reached; otherwise, undefined is used to fill out the extra space.

    Parameters

    • match: number | T[]

      If match is an Array, then the length of match is used; otherwise, the numeric value of match is used.

    • Optional strict: boolean

      If true, the final length of the Array is truncated to the value specified in match; otherwise, the greater of match and the length of this Array is used.

    Returns Array<T>