reactronic 0.24.200 → 0.24.202
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.
|
@@ -35,7 +35,7 @@ export declare abstract class RxNode<E = unknown> {
|
|
|
35
35
|
static readonly longFrameDuration = 300;
|
|
36
36
|
static currentUpdatePriority: Priority;
|
|
37
37
|
static frameDuration: number;
|
|
38
|
-
static
|
|
38
|
+
static declare<E = void>(driver: RxNodeDriver<E>, declaration?: RxNodeDecl<E>, preset?: RxNodeDecl<E>): RxNode<E>;
|
|
39
39
|
static get isFirstUpdate(): boolean;
|
|
40
40
|
static get key(): string;
|
|
41
41
|
static get stamp(): number;
|
|
@@ -55,7 +55,7 @@ export declare abstract class RxNode<E = unknown> {
|
|
|
55
55
|
static setDefaultLoggingOptions(logging?: LoggingOptions): void;
|
|
56
56
|
}
|
|
57
57
|
export type RxNodeDecl<E = unknown> = {
|
|
58
|
-
|
|
58
|
+
formula?: Delegate<E>;
|
|
59
59
|
key?: string;
|
|
60
60
|
mode?: Mode;
|
|
61
61
|
activation?: Delegate<E>;
|
|
@@ -35,7 +35,7 @@ export var Priority;
|
|
|
35
35
|
Priority[Priority["background"] = 2] = "background";
|
|
36
36
|
})(Priority || (Priority = {}));
|
|
37
37
|
export class RxNode {
|
|
38
|
-
static
|
|
38
|
+
static declare(driver, declaration, preset) {
|
|
39
39
|
var _a;
|
|
40
40
|
let result;
|
|
41
41
|
if (declaration)
|
|
@@ -208,9 +208,9 @@ function activateViaPresetChain(element, declaration) {
|
|
|
208
208
|
}
|
|
209
209
|
function updateViaPresetChain(element, declaration) {
|
|
210
210
|
const preset = declaration.preset;
|
|
211
|
-
const
|
|
212
|
-
if (
|
|
213
|
-
|
|
211
|
+
const formula = declaration.formula;
|
|
212
|
+
if (formula)
|
|
213
|
+
formula(element, preset ? () => updateViaPresetChain(element, preset) : NOP);
|
|
214
214
|
else if (preset)
|
|
215
215
|
updateViaPresetChain(element, preset);
|
|
216
216
|
}
|
|
@@ -73,7 +73,7 @@ export function getCallerInfo(prefix) {
|
|
|
73
73
|
const stack = error.stack || "";
|
|
74
74
|
Error.stackTraceLimit = restore;
|
|
75
75
|
const lines = stack.split("\n");
|
|
76
|
-
let i = lines.findIndex(x => x.indexOf(".
|
|
76
|
+
let i = lines.findIndex(x => x.indexOf(".declare") >= 0);
|
|
77
77
|
i = i >= 0 ? i + 2 : 5;
|
|
78
78
|
let caller = extractFunctionAndLocation(lines[i]);
|
|
79
79
|
let location = caller;
|