Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace Array

Index

Type aliases

Accumulator<A, B>: (previousValue: B, value: A, index: number, array: A[]) => B

Type parameters

  • A

  • B

Type declaration

    • (previousValue: B, value: A, index: number, array: A[]): B
    • Parameters

      • previousValue: B
      • value: A
      • index: number
      • array: A[]

      Returns B

Map<A, B>: (value: A, index: number, array: A[]) => B

Type parameters

  • A

  • B

Type declaration

    • (value: A, index: number, array: A[]): B
    • Parameters

      • value: A
      • index: number
      • array: A[]

      Returns B

Predicate<A>: (value: A, index: number, array: A[]) => boolean

Type parameters

  • A

Type declaration

    • (value: A, index: number, array: A[]): boolean
    • Parameters

      • value: A
      • index: number
      • array: A[]

      Returns boolean

Sort<A>: (a: A, b: A) => number

Type parameters

  • A

Type declaration

    • (a: A, b: A): number
    • Parameters

      • a: A
      • b: A

      Returns number

Functions

  • concat<A>(arr: A[], src: A[]): A[]
  • copyWithin<A>(__namedParameters: A[], target?: number, start?: number, end?: number): A[]
  • Type parameters

    • A

    Parameters

    • __namedParameters: A[]
    • Optional target: number
    • Optional start: number
    • Optional end: number

    Returns A[]

  • entries<A>(arr: A[]): IterableIterator<[number, A]>
  • fill<A>(__namedParameters: A[], value: A, start?: number, end?: number): A[]
  • Type parameters

    • A

    Parameters

    • __namedParameters: A[]
    • value: A
    • Optional start: number
    • Optional end: number

    Returns A[]

  • findIndex<A>(arr: A[], f: Predicate<A>): number
  • flat<A>(arr: A[], deep?: number): FlatArray<A, 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -1>[]
  • Type parameters

    • A

    Parameters

    • arr: A[]
    • Optional deep: number

    Returns FlatArray<A, 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -1>[]

  • flatMap<A, B>(arr: A[], f: Map<A, B>): B[]
  • forEach<A, B>(arr: A[], f: Map<A, B>): void
  • head<A>(__namedParameters: A[]): A
  • includes<A>(arr: A[], value: A, start?: number): boolean
  • Type parameters

    • A

    Parameters

    • arr: A[]
    • value: A
    • Optional start: number

    Returns boolean

  • indexOf<A>(arr: A[], value: A, start?: number): number
  • Type parameters

    • A

    Parameters

    • arr: A[]
    • value: A
    • Optional start: number

    Returns number

  • init<A>(arr: A[]): never
  • join<A>(arr: A[], separator?: A): string
  • Type parameters

    • A: string

    Parameters

    • arr: A[]
    • Optional separator: A

    Returns string

  • keys<A>(arr: A[]): IterableIterator<number>
  • last<A>(arr: A[]): A
  • lastIndexOf<A>(arr: A[], value: A, start?: number): number
  • Type parameters

    • A

    Parameters

    • arr: A[]
    • value: A
    • Optional start: number

    Returns number

  • map<A, B>(arr: A[], f: Map<A, B>): B[]
  • pop<A>(__namedParameters: A[]): A[]
  • push<A>(__namedParameters: A[], ...values: A[]): A[]
  • Type parameters

    • A

    Parameters

    • __namedParameters: A[]
    • Rest ...values: A[]

    Returns A[]

  • reduce<A, B>(arr: A[], f: Accumulator<A, B>, initialValue?: B): B
  • reduceRight<A, B>(arr: A[], f: Accumulator<A, B>, initialValue?: B): B
  • repeat<A>(value: A, nb: number): A[]
  • reverse<A>(__namedParameters: A[]): A[]
  • shift<A>(__namedParameters: A[]): A[]
  • slice<A>(arr: A[], start?: number, end?: number): A[]
  • Type parameters

    • A

    Parameters

    • arr: A[]
    • Optional start: number
    • Optional end: number

    Returns A[]

  • sort<A>(__namedParameters: A[], f?: Sort<A>): A[]
  • splice<A>(__namedParameters: A[], start?: number, nb?: number, ...elem: A[]): A[]
  • Type parameters

    • A

    Parameters

    • __namedParameters: A[]
    • Optional start: number
    • Optional nb: number
    • Rest ...elem: A[]

    Returns A[]

  • tail<A>(__namedParameters: A[]): A[]
  • toLocaleString<A>(arr: A[]): string
  • toString<A>(arr: A[]): string
  • unshift<A>(__namedParameters: A[], v: A, ...values: A[]): A[]
  • Type parameters

    • A

    Parameters

    • __namedParameters: A[]
    • v: A
    • Rest ...values: A[]

    Returns A[]

  • values<A>(arr: A[]): IterableIterator<A>
  • zip<A, B>(arr1: A[], arr2: B[]): [A, B][]

Generated using TypeDoc