array.ts

Declarations
#

4 declarations

view source

EMPTY_ARRAY
#

remove_unordered
#

array.ts view source

(array: any[], index: number): void

Removes an element from array at index in an unordered manner.

array

type any[]

index

type number

returns

void

to_array
#

array.ts view source

<T>(value: T): T extends readonly any[] ? T : T[]

Converts value to an array if it's not already.

value

type T

returns

T extends readonly any[] ? T : T[]

to_next
#

array.ts view source

<T extends ReadonlyArray<any>>(array: T): () => ArrayElement<T>

Returns a function that returns the next item in the array in a linear sequence, looping back to index 0 when it reaches the end.

array

type T

returns

() => ArrayElement<T>

Imported by
#