array.d.ts
51 lines
| 2.3 KiB
| video/mp2t
|
TypeScriptLexer
cin
|
r2 | import { GenericConstructor } from "../interfaces"; | ||
/* dojo/_base/array */ | ||||
cin
|
r15 | |||
/** | ||||
* Determines whether or not every item in arr satisfies the condition implemented by callback. | ||||
* @param {T[] | string} arr the array to iterate on. If a string, operates on individual characters. | ||||
* @param {Function | string} callback a function is invoked with three arguments: item, index, and | ||||
* array and returns true if the condition is met. | ||||
* @param {object} thisObj may be used to scope the call to callback | ||||
*/ | ||||
export function every<T>(arr: T[] | string, callback: string | ((item: T, idx: number, arr: T[]) => boolean), thisObj?: Object): boolean; | ||||
cin
|
r2 | |||
cin
|
r15 | /** | ||
* Determines whether or not any item in arr satisfies the condition implemented by callback. | ||||
*/ | ||||
export function some<T>(arr: T[] | string, callback: string | ((item: T, idx: number, arr: T[]) => boolean), thisObj?: Object): boolean; | ||||
cin
|
r2 | |||
cin
|
r15 | /** | ||
* locates the last index of the provided value in the passed array. If the value is not found, -1 | ||||
* is returned. | ||||
* @param {boolean} findLast Makes indexOf() work like lastIndexOf(). Used internally; not meant | ||||
* for external usage. | ||||
*/ | ||||
export function indexOf<T>(arr: T[], value: T, fromIndex?: number, findLast?: boolean): number; | ||||
cin
|
r2 | |||
cin
|
r15 | /** | ||
* locates the first index of the provided value in the passed array. If the value is not found, | ||||
* -1 is returned. | ||||
*/ | ||||
export function lastIndexOf<T>(arr: T[], value: T, fromIndex?: number): number; | ||||
cin
|
r2 | |||
cin
|
r15 | /** | ||
* locates the last index of the provided value in the passed array. If the value is not found, | ||||
* -1 is returned. | ||||
*/ | ||||
export function forEach<T>(arr: T[], callback: string | ((item: T, idx: number, arr: T[]) => void), thisObj?: Object): void; | ||||
cin
|
r2 | |||
cin
|
r15 | /** | ||
* for every item in arr, callback is invoked. Return values are ignored. If you want to break | ||||
* out of the loop, consider using array.every() or array.some(). | ||||
*/ | ||||
export function map<T, U>(arr: T[] | string, callback: string | ((item: T, idx: number, arr: T[]) => U), thisObj?: Object, Ctr?: GenericConstructor<U[]>): U[]; | ||||
cin
|
r2 | |||
cin
|
r15 | /** | ||
* Returns a new Array with those items from arr that match the condition implemented by | ||||
* callback. | ||||
*/ | ||||
export function filter<T>(arr: T[], callback: string | ((item: T, idx: number, arr: T[]) => boolean), thisObj?: Object): T[]; | ||||
cin
|
r2 | |||
cin
|
r15 | export function clearCache(): void; | ||