@mui/x-internals
Version:
Utility functions for the MUI X packages (internal use only).
13 lines • 392 B
TypeScript
type Listener<T> = (value: T) => void;
export declare class Store<State> {
state: State;
private listeners;
static create<T>(state: T): Store<T>;
constructor(state: State);
subscribe: (fn: Listener<State>) => () => void;
getSnapshot: () => State;
update: (newState: State) => void;
apply(changes: Partial<State>): void;
set<T>(key: keyof State, value: T): void;
}
export {};