///
declare module dstore {
export interface FetchArray extends Array {
totalLength: number;
}
export interface FetchPromise extends dojo.promise.Promise {
totalLength: dojo.promise.Promise;
}
export interface ChangeEvent {
id: any;
index?: number;
previousIndex?: number;
target: T;
totalLength: number;
type: string;
}
export interface Collection {
idProperty: string;
Model: { new (...args: any[]): T; };
tracking?: { remove(): void; };
add(object: T, options?: {}): dojo.promise.Promise;
emit(eventName: string, event: ChangeEvent): boolean;
fetch(): dstore.FetchPromise;
fetchRange(kwArgs: { start?: number; end?: number; }): dstore.FetchPromise;
filter(query: string | {} | { (item: T, index: number): boolean; }): this;
forEach(callback: (item: T, index: number) => void, thisObject?: any): dojo.promise.Promise;
get(id: any): dojo.promise.Promise;
getIdentity(object: T): any;
on(eventName: string, listener: (event: ChangeEvent) => void): dojo.Handle;
put(object: T, options?: {}): dojo.promise.Promise;
remove(id: any): dojo.promise.Promise