reactronic 0.22.508 → 0.22.509
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.
|
@@ -4,6 +4,13 @@ export declare type BoolOnly<T> = Pick<T, {
|
|
|
4
4
|
export declare type GivenTypeOnly<T, V> = Pick<T, {
|
|
5
5
|
[P in keyof T]: T[P] extends V ? P : never;
|
|
6
6
|
}[keyof T]>;
|
|
7
|
+
declare global {
|
|
8
|
+
interface T extends Object {
|
|
9
|
+
$$: {
|
|
10
|
+
readonly [P in keyof T]-?: Ref<T[P]>;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
}
|
|
7
14
|
export declare function refs<O extends object = object>(owner: O): {
|
|
8
15
|
readonly [P in keyof O]-?: Ref<O[P]>;
|
|
9
16
|
};
|
package/build/dist/source/Ref.js
CHANGED
|
@@ -83,3 +83,9 @@ class CustomToggleRefGettingProxy {
|
|
|
83
83
|
return new ToggleRef(obj, prop, this.value1, this.value2);
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
|
+
Object.defineProperty(Object.prototype, '$$', {
|
|
87
|
+
configurable: false, enumerable: false,
|
|
88
|
+
get() {
|
|
89
|
+
return new Proxy(this, RefGettingProxy);
|
|
90
|
+
},
|
|
91
|
+
});
|