reactronic 0.22.317 → 0.22.318
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.
|
@@ -9,8 +9,8 @@ export declare class Ref<T = any> {
|
|
|
9
9
|
readonly name: string;
|
|
10
10
|
readonly index: number;
|
|
11
11
|
constructor(owner: any, name: string, index?: number);
|
|
12
|
-
get
|
|
13
|
-
set
|
|
12
|
+
get variable(): T;
|
|
13
|
+
set variable(value: T);
|
|
14
14
|
nonreactive(): T;
|
|
15
15
|
observe(): T;
|
|
16
16
|
unobserve(): T;
|
package/build/dist/source/Ref.js
CHANGED
|
@@ -6,23 +6,23 @@ export class Ref {
|
|
|
6
6
|
this.name = name;
|
|
7
7
|
this.index = index;
|
|
8
8
|
}
|
|
9
|
-
get
|
|
9
|
+
get variable() {
|
|
10
10
|
if (this.index < 0)
|
|
11
11
|
return this.owner[this.name];
|
|
12
12
|
else
|
|
13
13
|
return this.owner[this.name][this.index];
|
|
14
14
|
}
|
|
15
|
-
set
|
|
15
|
+
set variable(value) {
|
|
16
16
|
if (this.index < 0)
|
|
17
17
|
this.owner[this.name] = value;
|
|
18
18
|
else
|
|
19
19
|
this.owner[this.name][this.index] = value;
|
|
20
20
|
}
|
|
21
21
|
nonreactive() {
|
|
22
|
-
return nonreactive(() => this.
|
|
22
|
+
return nonreactive(() => this.variable);
|
|
23
23
|
}
|
|
24
24
|
observe() {
|
|
25
|
-
return this.
|
|
25
|
+
return this.variable;
|
|
26
26
|
}
|
|
27
27
|
unobserve() {
|
|
28
28
|
throw new Error('not implemented');
|