bunshin-clone 2.0.8 → 2.0.9
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.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
type Refs = WeakMap<object, object>;
|
|
2
2
|
|
|
3
|
-
interface
|
|
3
|
+
interface BunshinCloneOptions {
|
|
4
4
|
preserveBufferSharing: boolean;
|
|
5
5
|
preserveDescriptors: boolean;
|
|
6
6
|
preserveSymbolKeys: boolean;
|
|
@@ -13,7 +13,7 @@ declare function isPrimitiveArray(array: Array_): boolean;
|
|
|
13
13
|
declare function isObject(value: unknown): value is object;
|
|
14
14
|
declare function isPlainObject(value: unknown): value is PlainObject;
|
|
15
15
|
|
|
16
|
-
declare function bunshinClone<T>(value: T, options?: Partial<
|
|
17
|
-
declare function clone<T>(value: T, settings:
|
|
16
|
+
declare function bunshinClone<T>(value: T, options?: Partial<BunshinCloneOptions>): T;
|
|
17
|
+
declare function clone<T>(value: T, settings: BunshinCloneOptions, refs: Refs): T;
|
|
18
18
|
|
|
19
|
-
export { type
|
|
19
|
+
export { type BunshinCloneOptions, type PlainObject, bunshinClone, clone, isObject, isPlainObject, isPrimitiveArray };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
type Refs = WeakMap<object, object>;
|
|
2
2
|
|
|
3
|
-
interface
|
|
3
|
+
interface BunshinCloneOptions {
|
|
4
4
|
preserveBufferSharing: boolean;
|
|
5
5
|
preserveDescriptors: boolean;
|
|
6
6
|
preserveSymbolKeys: boolean;
|
|
@@ -13,7 +13,7 @@ declare function isPrimitiveArray(array: Array_): boolean;
|
|
|
13
13
|
declare function isObject(value: unknown): value is object;
|
|
14
14
|
declare function isPlainObject(value: unknown): value is PlainObject;
|
|
15
15
|
|
|
16
|
-
declare function bunshinClone<T>(value: T, options?: Partial<
|
|
17
|
-
declare function clone<T>(value: T, settings:
|
|
16
|
+
declare function bunshinClone<T>(value: T, options?: Partial<BunshinCloneOptions>): T;
|
|
17
|
+
declare function clone<T>(value: T, settings: BunshinCloneOptions, refs: Refs): T;
|
|
18
18
|
|
|
19
|
-
export { type
|
|
19
|
+
export { type BunshinCloneOptions, type PlainObject, bunshinClone, clone, isObject, isPlainObject, isPrimitiveArray };
|