We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5f51856 + 59d67f0 commit d1f35dfCopy full SHA for d1f35df
package.json
@@ -13,6 +13,7 @@
13
"shared.js",
14
"store.js",
15
"store.umd.js",
16
+ "store.d.ts",
17
"svelte",
18
"README.md"
19
],
store.d.ts
@@ -0,0 +1,19 @@
1
+interface Options {
2
+ immutable: boolean;
3
+}
4
+
5
+interface Cancellable {
6
+ cancel: () => void;
7
8
9
+type State = Record<string, any>;
10
11
+export declare class Store {
12
+ constructor(state: State, options?: Options);
+ public compute(key: string, dependencies: string[]): void;
+ public fire(name: string, data?: any): void;
+ public get(): State;
+ public on(name: string, callback: (data: any) => void): Cancellable;
+ public set(state: State);
0 commit comments