Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • ArrayConstructor

Index

Methods

Methods

from

  • from<T>(arrayLike: ArrayLike<T>): T[]
  • from<T, U>(arrayLike: ArrayLike<T>, mapfn: function, thisArg?: any): U[]
  • Creates an array from an array-like object.

    Type parameters

    • T

    Parameters

    • arrayLike: ArrayLike<T>

      An array-like object to convert to an array.

    Returns T[]

  • Creates an array from an iterable object.

    Type parameters

    • T

    • U

    Parameters

    • arrayLike: ArrayLike<T>

      An array-like object to convert to an array.

    • mapfn: function

      A mapping function to call on every element of the array.

        • (v: T, k: number): U
        • Parameters

          • v: T
          • k: number

          Returns U

    • Optional thisArg: any

      Value of 'this' used to invoke the mapfn.

    Returns U[]

of

  • of<T>(...items: T[]): T[]
  • Returns a new array from a set of elements.

    Type parameters

    • T

    Parameters

    • Rest ...items: T[]

      A set of elements to include in the new array object.

    Returns T[]

Generated using TypeDoc