createStore< State, Payload extends unknown, Actions extends Record<string, Action<Payload, State>>,>( initialState: State, actions: Actions,): { events: EventTarget; get: <V>(selector: (state: State) => V) => V; select: <V>(selector: (state: State) => V) => Effect<V>; store: { [K in string | number | symbol]: ( ...args: ActionParameters<Actions[K]>, ) => any }; transaction: (handler: () => any) => Promise<void>; useStore: () => { events: EventTarget; get: <V>(selector: (state: State) => V) => V; select: <V>(selector: (state: State) => V) => Effect<V>; store: { [K in string | number | symbol]: ( ...args: ActionParameters<Actions[K]>, ) => any }; transaction: (handler: () => any) => Promise<void>; };} Returns {
events: EventTarget;
get: <V>(selector: (state: State) => V) => V;
select: <V>(selector: (state: State) => V) => Effect<V>;
store: {
[K in string | number | symbol]: (
...args: ActionParameters<Actions[K]>,
) => any
};
transaction: (handler: () => any) => Promise<void>;
useStore: () => {
events: EventTarget;
get: <V>(selector: (state: State) => V) => V;
select: <V>(selector: (state: State) => V) => Effect<V>;
store: {
[K in string | number | symbol]: (
...args: ActionParameters<Actions[K]>,
) => any
};
transaction: (handler: () => any) => Promise<void>;
};
}