mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
23 lines
747 B
TypeScript
23 lines
747 B
TypeScript
import { Store } from "./store.js";
|
|
//#region src/core/config.d.ts
|
|
interface StoreCallbacks<Target, State> {
|
|
onSetup?: (ctx: StoreSetupContext<Target, State>) => void;
|
|
onAttach?: (ctx: StoreAttachContext<Target, State>) => void;
|
|
onError?: (ctx: StoreErrorContext<Target, State>) => void;
|
|
}
|
|
interface StoreSetupContext<Target, State> {
|
|
store: Store<Target, State>;
|
|
signal: AbortSignal;
|
|
}
|
|
interface StoreAttachContext<Target, State> {
|
|
store: Store<Target, State>;
|
|
target: Target;
|
|
signal: AbortSignal;
|
|
}
|
|
interface StoreErrorContext<Target, State> {
|
|
store: Store<Target, State>;
|
|
error: unknown;
|
|
}
|
|
//#endregion
|
|
export { StoreAttachContext, StoreCallbacks, StoreErrorContext, StoreSetupContext };
|
|
//# sourceMappingURL=config.d.ts.map
|