You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/store.d.ts

20 lines
431 B

interface Options {
immutable: boolean;
}
interface Cancellable {
cancel: () => void;
}
type State = Record<string, any>;
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 on(name: string, callback: (data: any) => void): Cancellable;
public set(state: State);
}