reactronic 0.96.26009 → 0.96.26010
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.
|
@@ -70,6 +70,7 @@ export type ReactiveTreeNodeDriver<E = unknown> = {
|
|
|
70
70
|
provideHost(node: ReactiveTreeNode<E>): ReactiveTreeNode<E>;
|
|
71
71
|
};
|
|
72
72
|
export type ReactiveTreeNodeContext<T extends Object = Object> = {
|
|
73
|
+
variable: ReactiveTreeVariable<T>;
|
|
73
74
|
value: T;
|
|
74
75
|
};
|
|
75
76
|
export declare abstract class BaseDriver<E = unknown> implements ReactiveTreeNodeDriver<E> {
|
|
@@ -315,11 +315,12 @@ class ReactiveTreeNode$ extends ReactiveTreeNode {
|
|
|
315
315
|
return gCurrentNode;
|
|
316
316
|
}
|
|
317
317
|
static tryUseTreeVariableValue(variable) {
|
|
318
|
-
var _a
|
|
318
|
+
var _a;
|
|
319
319
|
let node = ReactiveTreeNode.current;
|
|
320
|
-
while (((_a = node.context) === null || _a === void 0 ? void 0 : _a.
|
|
320
|
+
while (((_a = node.context) === null || _a === void 0 ? void 0 : _a.variable) !== variable && node.owner !== node)
|
|
321
321
|
node = node.outer;
|
|
322
|
-
|
|
322
|
+
const ctx = node.context;
|
|
323
|
+
return (ctx === null || ctx === void 0 ? void 0 : ctx.variable) === variable ? ctx.value : undefined;
|
|
323
324
|
}
|
|
324
325
|
static useTreeVariableValue(variable) {
|
|
325
326
|
var _a;
|