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