/** Describes a dictionary of literal values. */ export interface PropertySet { [name: string]: boolean | number | string; } /** Provides a means to iterate over a collection efficiently. */ export declare class Iterator { /** Returns an empty iterable. */ static empty: Iterator; current: T | undefined; key: string | number | undefined; /** Wraps the items or item as an iterable. */ static from(items: Iterable): Iterator; /** Returns an iterable which represents the concatenation of two iterables. */ concat(items: Iterable): Iterator; /** Returns an iterable which filters. */ filter(predicate: (item: T, key: string | number) => boolean): Iterator; /** Exposes the remaining assets of the collection as an array. */ list(): T[]; /** Maps the iterator to another collection. */ map(itemSelector: (item: T) => Iterable, keySelector?: (result: TResult, key: string | number) => string | number): Iterator; /** Selects the next asset of the collection. */ next(): boolean; /** Peeks at the next item. */ peek(): T | undefined; } /** Used internally by Dictionary to track items. */ interface DictionaryEntry { /** Used to track the index of the entry. */ index: number; /** Used to track the key of the entry. */ key: string; /** Used to track the value of the entry. */ value: T; } export declare class Dictionary { /** Assign the value to the given key. */ protected array: DictionaryEntry[]; /** Assign the value to the given key. */ protected iterating: boolean; /** Assign the value to the given key. */ protected lookup: Record>; /** Gets the length. */ get length(): number; /** Assigns the value to the given key. */ assign(key: any, value: T): T | undefined; /** Clears the collection. */ clear(): void; /** Tests if the key exists. */ exists(key: any): boolean; /** Finds the specific item given the key. */ find(key: any): T | undefined; /** Performs an iteration of the items. */ iterate(): Iterator; /** Removes an item given the key. */ remove(key: any): boolean; /** Ensures the array internal array is mutable so that iterators are not corrupted. */ protected ensureMutable(): DictionaryEntry[]; } /** Offers a means to tie an item to a result. */ interface Thunk { /** Exposes the result for the thunk. */ item: any; /** Exposes the result for the thunk. */ result: any; } /** Offers a means of using an array to hold many thunks. */ interface ThunkArray extends Array { /** Indicates the owner. */ owner?: any; } /** Provides a means to stash per key per object values. */ export declare class Stash { /** Structure for managing the internal state. */ protected lookup: Record; /** Reads the result for a particular key/item. */ read(key: any, item: any): any; /** Writes the result for a particular key/item. */ write(key: any, item: any, result: any): any; /** Indicates if the thunk(s) is a singleton or a provisioned array. */ protected isArray(thunks: Thunk | ThunkArray): thunks is ThunkArray; } /** Convenience for specifying an iterable type. */ export type Iterable = T | T[] | Iterator; export {};