diff --git a/store.d.ts b/store.d.ts index 95d90c3848..aa280da953 100644 --- a/store.d.ts +++ b/store.d.ts @@ -6,14 +6,24 @@ interface Cancellable { cancel: () => void; } +interface Tuple extends Array { + 0: T; + length: L; +} + type State = Record; export declare class Store { constructor(state: State, options?: Options); - public compute(key: string, dependencies: string[]): void; + public compute( + key: string, + dependencies: Tuple, + fn: (...dependencies: Tuple) => any, + ): void; + public fire(name: string, data?: any): void; public get(): State; public on(name: string, callback: (data: any) => void): Cancellable; - public set(state: State); + public set(state: State): void; }