interface Cache { _keys?: any[]; _values?: any[]; has: (value: any) => boolean; set: (key: any, value: any) => void; get: (key: any) => any; } export interface CreateCopierOptions { array?: InternalCopier; arrayBuffer?: InternalCopier; blob?: InternalCopier; dataView?: InternalCopier; date?: InternalCopier; map?: InternalCopier>; object?: InternalCopier>; regExp?: InternalCopier; set?: InternalCopier>; } type InternalCopier = (value: Value, state: State) => Value; export interface State { Constructor: any; cache: Cache; copier: InternalCopier; prototype: any; } /** * Copy an value deeply as much as possible. */ export default function copy(value: Value): Value; /** * Copy an value deeply as much as possible, where strict recreation of object properties * are maintained. All properties (including non-enumerable ones) are copied with their * original property descriptors on both objects and arrays. */ export function copyStrict(value: Value): Value; /** * Create a custom copier based on the object-specific copy methods passed. */ export function createCopier( options: CreateCopierOptions ): (value: Value) => Value; /** * Create a custom copier based on the object-specific copy methods passed, defaulting to the * same internals as `copyStrict`. */ export function createStrictCopier( options: CreateCopierOptions ): (value: Value) => Value;