mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
build(store): build26 from 45504a2b
This commit is contained in:
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
//#region src/core/state.d.ts
|
||||
type StateChange = () => void;
|
||||
type UnknownState = Record<string, unknown>;
|
||||
interface SubscribeOptions {
|
||||
signal?: AbortSignal;
|
||||
}
|
||||
interface State<T> {
|
||||
readonly current: Readonly<T>;
|
||||
subscribe(callback: StateChange, options?: SubscribeOptions): () => void;
|
||||
}
|
||||
interface WritableState<T> extends State<T> {
|
||||
patch: (partial: Partial<T>) => void;
|
||||
}
|
||||
declare function flush(): void;
|
||||
declare function createState<T>(initial: T): WritableState<T>;
|
||||
declare function isState(value: unknown): value is State<object>;
|
||||
//#endregion
|
||||
export { State, StateChange, SubscribeOptions, UnknownState, WritableState, createState, flush, isState };
|
||||
//# sourceMappingURL=state.d.ts.map
|
||||
Reference in New Issue
Block a user