UNPKG

ts-simple-ast

Version:

TypeScript compiler wrapper for AST navigation and code generation.

13 lines (12 loc) 702 B
import * as ts from "typescript"; export declare class ArrayUtils { private constructor(); static isNullOrEmpty<T>(a: (T[] | undefined)): a is undefined; static getUniqueItems<T>(a: T[]): T[]; static removeFirst<T>(a: T[], item: T): boolean; static find<T>(items: T[] | IterableIterator<T>, condition: (item: T) => boolean): T | undefined; static from<T>(items: IterableIterator<T> | ts.Iterator<T>): T[]; static toIterator<T>(items: T[]): IterableIterator<T>; static binaryInsert<T>(items: T[], newItem: T, isGreaterThan: (item: T) => boolean): void; static binarySearch<T>(items: T[], isEqual: (item: T) => boolean, isGreaterThan: (item: T) => boolean): number; }