Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ArrayConstructor

Hierarchy

  • ArrayConstructor

Callable

  • __call(arrayLength?: number): any[]
  • __call<T>(arrayLength: number): T[]
  • __call<T>(...items: T[]): T[]
  • Parameters

    • Optional arrayLength: number

    Returns any[]

  • Type parameters

    • T

    Parameters

    • arrayLength: number

    Returns T[]

  • Type parameters

    • T

    Parameters

    • Rest ...items: T[]

    Returns T[]

Index

Constructors

Properties

Methods

Constructors

constructor

  • new ArrayConstructor(arrayLength?: number): any[]
  • new ArrayConstructor<T>(arrayLength: number): T[]
  • new ArrayConstructor<T>(...items: T[]): T[]
  • Parameters

    • Optional arrayLength: number

    Returns any[]

  • Type parameters

    • T

    Parameters

    • arrayLength: number

    Returns T[]

  • Type parameters

    • T

    Parameters

    • Rest ...items: T[]

    Returns T[]

Properties

prototype

prototype: Array<any>

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[]

isArray

  • isArray(arg: any): arg
  • Parameters

    • arg: any

    Returns arg

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[]