seitu 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -5,7 +5,7 @@ export type SchemaStoreSchema = Record<string, StandardSchemaV1<unknown, unknown
|
|
|
5
5
|
export type SchemaStoreOutput<S extends SchemaStoreSchema> = Simplify<{
|
|
6
6
|
[K in keyof S]: StandardSchemaV1.InferOutput<S[K]>;
|
|
7
7
|
}>;
|
|
8
|
-
export interface SchemaStore<O extends Record<string, unknown>> extends Subscribable<O>, Readable<O>, Writable<Partial<O
|
|
8
|
+
export interface SchemaStore<O extends Record<string, unknown>> extends Subscribable<O>, Readable<O>, Writable<Partial<O>, O> {
|
|
9
9
|
getDefaultValue: <K extends keyof O>(key: K) => O[K];
|
|
10
10
|
}
|
|
11
11
|
export interface SchemaStoreOptions<S extends Record<string, StandardSchemaV1>> {
|
|
@@ -14,8 +14,8 @@ export interface Subscribable<V> {
|
|
|
14
14
|
export interface Readable<T> {
|
|
15
15
|
get: () => T;
|
|
16
16
|
}
|
|
17
|
-
export interface Writable<T> {
|
|
18
|
-
set: (value: T | ((prev:
|
|
17
|
+
export interface Writable<T, P = T> {
|
|
18
|
+
set: (value: T | ((prev: P) => T)) => any;
|
|
19
19
|
}
|
|
20
20
|
export declare function createSubscription<T = void>(): {
|
|
21
21
|
subscribe: (callback: (payload: T) => any) => () => void;
|