type IterableObject = Record & InstanceType & { entries?(): IterableIterator<[string, string]>; }; /** * Shallow clones objects, Headers, etc. */ export declare function shallowClone(source: IterableObject): IterableObject; /** * Deep clones an object, but drops out values that are functions, undefined, instances. * Useful for example in tests where jest cannot compare objects with functions */ export declare function cloneWithJSONConversion(source: unknown): IterableObject; /** * Deep clones source */ export declare function deepClone(source: unknown): IterableObject; /** * Helper for copying any object, or converting to an object, anything that has "entries()" property. Like Headers. * Deep clones by default. * @param source IterableObject any object * @param iterator (obj: IterableObject, key: string, value: unknown) => unknown, any non-undefined value is set as obj[key]=value. * @param deep If true (default), the source is checked for nested objects */ export declare function cloneWithIterator(source: IterableObject, iterator: (obj: IterableObject, key: string, value: unknown) => unknown, deep?: boolean): IterableObject; /** * * Uses cloneIterableObject(), but adds an iterator that returns obj value. * @see cloneWithIterator * @param source IterableObject any object * @param deep If true (default), the source is checked for nested objects */ export declare function cloneObject(source: IterableObject, deep?: boolean): IterableObject; export {};