/** @noSelfInFile */ /** * (Lua-safe) Gets or sets the length of the array. This is a number one higher * than the highest index in the array. */ export declare const getLength: (arr: T[]) => number; /** * Removes nils from the array. */ export declare const compact: (arr: (T | null | undefined)[]) => T[]; /** * (Lua-safe) Performs the specified action for each element in an array. */ export declare const forEach: (arr: T[], fn: (element: T, index: number) => void) => void; declare type Filter = { (arr: A[], fn: (element: A, index: number) => boolean): A[]; (arr: A[], fn: (element: A | B, index: number) => element is B): B[]; }; /** * (Lua-safe) Returns the elements of an array that meet the condition specified * in a callback function. */ export declare const filter: Filter; /** * (Lua-safe) Calls a defined callback function on each element of an array, and * returns an array that contains the results. */ export declare const map: (arr: A[], fn: (element: A, index: number) => B) => B[]; /** * (Lua-safe) Adds all the elements of an array into a string, separated by the * specified separator string. */ export declare const join: (arr: A[], separator?: string) => string; export {};