@ztimson/utils 0.27.0 → 0.27.2
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.cjs +15 -34
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +15 -34
- package/dist/index.mjs.map +1 -1
- package/dist/objects.d.ts +7 -7
- package/package.json +1 -1
package/dist/objects.d.ts
CHANGED
|
@@ -2,19 +2,19 @@ export type Delta = {
|
|
|
2
2
|
[key: string]: any | Delta | null;
|
|
3
3
|
};
|
|
4
4
|
/**
|
|
5
|
-
* Applies deltas
|
|
6
|
-
* @param
|
|
7
|
-
* @param deltas
|
|
5
|
+
* Applies deltas to `target`.
|
|
6
|
+
* @param base starting point
|
|
7
|
+
* @param deltas List of deltas to apply
|
|
8
8
|
* @returns Mutated target
|
|
9
9
|
*/
|
|
10
|
-
export declare function applyDeltas(
|
|
10
|
+
export declare function applyDeltas(base: any, ...deltas: any): any;
|
|
11
11
|
/**
|
|
12
12
|
* Creates a nested delta that reverts `target` back to `old`.
|
|
13
13
|
* @param old - Original object
|
|
14
|
-
* @param
|
|
15
|
-
* @returns
|
|
14
|
+
* @param updated - Modified object
|
|
15
|
+
* @returns New changes
|
|
16
16
|
*/
|
|
17
|
-
export declare function calcDelta(old: any,
|
|
17
|
+
export declare function calcDelta(old: any, updated: any): any;
|
|
18
18
|
/**
|
|
19
19
|
* Removes any null values from an object in-place
|
|
20
20
|
*
|