universal-stores
Advanced tools
Comparing version 2.1.1 to 2.2.0
@@ -35,2 +35,3 @@ /** | ||
* @param map a function that takes the current value of the source store and maps it to another value. | ||
* @param config a {@link DerivedStoreConfig} which contains configuration information such as a value comparator to avoid needless notifications to subscribers. | ||
*/ | ||
@@ -54,8 +55,9 @@ export declare function makeDerivedStore<TIn, TOut>(readonlyStore: ReadonlyStore<TIn>, map: (value: TIn) => TOut, config?: DerivedStoreConfig<TOut>): ReadonlyStore<TOut>; | ||
* @param map a function that takes the current value of all the source stores and maps it to another value. | ||
* @param config a {@link DerivedStoreConfig} which contains configuration information such as a value comparator to avoid needless notifications to subscribers. | ||
*/ | ||
export declare function makeDerivedStore<TIn extends [] | [unknown, ...unknown[]], TOut>(readonlyStores2: { | ||
export declare function makeDerivedStore<TIn extends unknown[] | [unknown, ...unknown[]], TOut>(readonlyStores: { | ||
[K in keyof TIn]: ReadonlyStore<TIn[K]>; | ||
}, map: (value: { | ||
[K in keyof TIn]: TIn[K]; | ||
} & unknown[]) => TOut, config?: DerivedStoreConfig<TOut>): ReadonlyStore<TOut>; | ||
}) => TOut, config?: DerivedStoreConfig<TOut>): ReadonlyStore<TOut>; | ||
/** | ||
@@ -77,2 +79,3 @@ * Create a derived store from multiple sources. | ||
* @param map a function that takes the current value of all the source stores and maps it to another value. | ||
* @param config a {@link DerivedStoreConfig} which contains configuration information such as a value comparator to avoid needless notifications to subscribers. | ||
*/ | ||
@@ -79,0 +82,0 @@ export declare function makeDerivedStore<TIn, TOut>(readonlyStores: { |
@@ -5,3 +5,3 @@ { | ||
"description": "State management made simple", | ||
"version": "2.1.1", | ||
"version": "2.2.0", | ||
"type": "module", | ||
@@ -64,3 +64,3 @@ "types": "dist/index.d.ts", | ||
"rimraf": "^3.0.2", | ||
"ts-node": "^10.4.0", | ||
"ts-node": "^10.9.1", | ||
"typedoc": "^0.22.17", | ||
@@ -67,0 +67,0 @@ "typedoc-plugin-markdown": "^3.12.1", |
43693
520