Interface Array

Provides extensions to the base ECMAScript (JavaScript) Array functionality by adding static methods. Array Type Extensions

see

{@link http://msdn.microsoft.com/en-us/library/bb383786(v=vs.100).aspx}

Index

Call signatures

Construct signatures

Properties

Methods

Call signatures

(arrayLength?: number): Array<any>

Parameters

  • arrayLength?: number optional

Returns

Array<any>

(arrayLength: number): Array<T>

Parameters

  • arrayLength: number

Returns

Array<T>

(items?: Array<T>): Array<T>

Parameters

  • items?: Array<T> optional

Returns

Array<T>

Construct signatures

constructor(arrayLength?: number): Array<any>

Parameters

  • arrayLength?: number optional

Returns

Array<any>

constructor(arrayLength: number): Array<T>

Parameters

  • arrayLength: number

Returns

Array<T>

constructor(items?: Array<T>): Array<T>

Parameters

  • items?: Array<T> optional

Returns

Array<T>

Properties

public prototype: Array<any>

Methods

public add(array: Array<any>, element: any)

Adds an element to the end of an Array object. This function is static and is invoked without creating an instance of the object.

Parameters

  • array: Array<any>
      The array to add the item to.
    
  • element: any

public addRange(array: any, items: any)

Copies all the elements of the specified array to the end of an Array object.

Parameters

  • array: any
  • items: any

public clear()

Removes all elements from an Array object.

public clone(): Array<any>

Creates a shallow copy of an Array object.

Returns

Array<any>

public contains(element: any): boolean

Determines whether an element is in an Array object.

Parameters

  • element: any

Returns

boolean

public dequeue(): any

Removes the first element from an Array object.

Returns

any

public enqueue(element: any)

Adds an element to the end of an Array object. Use the add function instead of the Array.enqueue function.

Parameters

  • element: any

public forEach(array: Array<any>, method: Function, instance: Array<any>)

Performs a specified action on each element of an Array object.

Parameters

  • array: Array<any>
  • method: Function
  • instance: Array<any>

public indexOf(array: Array<any>, item: any, startIndex?: number): number

Searches for the specified element of an Array object and returns its index.

Parameters

  • array: Array<any>
  • item: any
  • startIndex?: number optional

Returns

number

public insert(array: Array<any>, index: number, item: any): any

Inserts a value at the specified location in an Array object.

Parameters

  • array: Array<any>
  • index: number
  • item: any

Returns

any

public isArray(arg: any): boolean

Parameters

  • arg: any

Returns

boolean

public parse(value: string): Array<any>

Creates an Array object from a string representation.

Parameters

  • value: string

Returns

Array<any>

public remove(array: Array<any>, item: any): boolean

Removes the first occurrence of an element in an Array object.

Parameters

  • array: Array<any>
  • item: any

Returns

boolean

public removeAt(array: Array<any>, index: number)

Removes an element at the specified location in an Array object.

Parameters

  • array: Array<any>
  • index: number