@manyducks.co/dolla 0.67.0 → 0.68.1
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.
- package/README.md +2 -2
- package/lib/index.d.ts +1 -1
- package/lib/index.js +45 -19
- package/lib/index.js.map +3 -3
- package/lib/state.d.ts +1 -1
- package/lib/store.d.ts +1 -1
- package/lib/views/store-scope.d.ts +5 -2
- package/package.json +1 -1
package/lib/state.d.ts
CHANGED
|
@@ -60,7 +60,7 @@ export declare function observe<T>(readable: Readable<T>, callback: (currentValu
|
|
|
60
60
|
* with this observer to prevent memory leaks.
|
|
61
61
|
*/
|
|
62
62
|
export declare function observe<T extends Readable<any>[]>(readables: [...T], callback: (currentValues: ReadableValues<T>, previousValues: ReadableValues<T>) => void): StopFunction;
|
|
63
|
-
export declare function computed<I, O>(readable: Readable<I>, compute: (currentValue: I, previousValue?: I) => O): Readable<O>;
|
|
63
|
+
export declare function computed<I, O>(readable: Readable<I>, compute: (currentValue: I, previousValue?: I) => O | Readable<O>): Readable<O>;
|
|
64
64
|
export declare function computed<I extends Readable<any>[], O>(readables: [...I], compute: (currentValues: ReadableValues<I>, previousValues?: ReadableValues<I>) => O): Readable<O>;
|
|
65
65
|
interface ProxyConfig<Source, Value> {
|
|
66
66
|
get(source: Source): Value;
|
package/lib/store.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { Store } from "../store.js";
|
|
2
2
|
import { ViewContext } from "../view.js";
|
|
3
|
-
export interface
|
|
3
|
+
export interface StoreConfig<O, E> {
|
|
4
4
|
store: Store<O, E>;
|
|
5
5
|
options?: O;
|
|
6
6
|
}
|
|
7
|
+
export interface StoreScopeProps {
|
|
8
|
+
stores: (StoreConfig<unknown, unknown> | Store<unknown, unknown>)[];
|
|
9
|
+
}
|
|
7
10
|
/**
|
|
8
11
|
* Creates an instance of a store available only to children of this StoreScope.
|
|
9
12
|
*/
|
|
10
|
-
export declare function StoreScope
|
|
13
|
+
export declare function StoreScope(props: StoreScopeProps, ctx: ViewContext): import("../markup.js").Markup;
|