declare namespace types { interface Collection {} interface List extends Collection { [index: number]: T; length: number; } interface ListIterator { (value: T, index: number, list: List): TResult; } interface Dictionary extends Collection { [index: string]: T; } interface ObjectIterator { (element: T, key: string, list: Dictionary): TResult; } interface MemoIterator { (prev: TResult, curr: T, index: number, list: List): TResult; } interface MemoObjectIterator { (prev: TResult, curr: T, key: string, list: Dictionary): TResult; } type Fn = (...args: any[]) => T; type AnyFn = Fn; type PlainObj = { [name: string]: T }; } declare const types: {}; export = types;