diff --git a/store.d.ts b/store.d.ts index db29eaaa2a..95d90c3848 100644 --- a/store.d.ts +++ b/store.d.ts @@ -2,22 +2,18 @@ interface Options { immutable: boolean; } -interface ObserveOptions { - defer: boolean; - init: boolean; -} - interface Cancellable { cancel: () => void; } -export declare class Store { +type State = Record; + +export declare class Store { constructor(state: State, options?: Options); public compute(key: string, dependencies: string[]): void; + public fire(name: string, data?: any): void; public get(): State; - public get(key: string): T; - public observe(key: string, callback: (value: T) => any, options?: ObserveOptions): Cancellable; - public onchange(callback: (state: State) => any): Cancellable; + public on(name: string, callback: (data: any) => void): Cancellable; public set(state: State); }