##// END OF EJS Templates
Added 'Attrs', 'Events' type parameters to DjxWidgetBase, typed 'on' and 'emit' methods
Added 'Attrs', 'Events' type parameters to DjxWidgetBase, typed 'on' and 'emit' methods

File last commit:

r15:8ef85ad13241 default
r30:a46488b209e8 v1.0.0-rc14 default
Show More
array.d.ts
51 lines | 2.3 KiB | video/mp2t | TypeScriptLexer
import { GenericConstructor } from "../interfaces";
/* dojo/_base/array */
/**
* 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;
/**
* 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;
/**
* 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;
/**
* 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;
/**
* 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;
/**
* 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[];
/**
* 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[];
export function clearCache(): void;