collectionUtil.d.ts 769 B

123456789101112131415
  1. import Dictionary from "typescript-collections/dist/lib/Dictionary";
  2. export declare class CollectionUtil {
  3. static contains2(array: any[], object: any): boolean;
  4. static last(array: any[]): any;
  5. /**
  6. * Iterates through a dictionary and calls iterationFunction.
  7. * If iterationFunction returns true the key gets stored.
  8. * all stored key will finally be removed from the dictionary.
  9. * @param dict
  10. * @param iterationFunction
  11. */
  12. static removeDictElementIfTrue<T, V>(dict: Dictionary<T, V>, iterationFunction: (key: T, value: V) => boolean): void;
  13. static getLastElement<T>(array: T[]): T;
  14. static binarySearch<T>(array: T[], element: T, cmp: (elem1: T, elem2: T) => number, startIndex?: number, endIndex?: number): number;
  15. }