tracked-instance 1.0.15 → 1.0.17
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/dist/index.mjs +1 -1
- package/dist/types/utils.d.ts +3 -3
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1589,7 +1589,7 @@ function useTrackedInstance(initialData) {
|
|
|
1589
1589
|
return result;
|
|
1590
1590
|
}
|
|
1591
1591
|
}));
|
|
1592
|
-
const _data = createNestedRef({ root: initialData }, (parentThree) => ({
|
|
1592
|
+
const _data = createNestedRef({ root: cloneDeep_default(initialData) }, (parentThree) => ({
|
|
1593
1593
|
set(target, property, value, receiver) {
|
|
1594
1594
|
const path = parentThree.concat({ target, property, receiver });
|
|
1595
1595
|
const oldValue = target[property];
|
package/dist/types/utils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export type DeepPartial<
|
|
2
|
-
[
|
|
3
|
-
} :
|
|
1
|
+
export type DeepPartial<Value> = Value extends object ? Value extends Array<infer ArrayValue> ? Array<DeepPartial<ArrayValue>> : {
|
|
2
|
+
[Property in keyof Value]?: DeepPartial<Value[Property]>;
|
|
3
|
+
} : Value;
|
|
4
4
|
export interface NestedProxyPathItem {
|
|
5
5
|
target: Record<string, any>;
|
|
6
6
|
property: string;
|