mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-26 14:15:57 +08:00
fix definition
This commit is contained in:
17
clone/clone.d.ts
vendored
17
clone/clone.d.ts
vendored
@@ -7,11 +7,18 @@
|
||||
* See clone JS source for API docs
|
||||
*/
|
||||
declare module "clone" {
|
||||
/**
|
||||
* @param parent
|
||||
* @param circular If not given, defaults to true in JS lib.
|
||||
*/
|
||||
function clone(parent: Object, circular?: boolean): Object
|
||||
var clone: {
|
||||
/**
|
||||
* @param val the value that you want to clone, any type allowed
|
||||
* @param circular Call clone with circular set to false if you are certain that obj contains no circular references. This will give better performance if needed. There is no error if undefined or null is passed as obj.
|
||||
* @param depth to wich the object is to be cloned (optional, defaults to infinity)
|
||||
*/
|
||||
<T>(val: T, circular?: boolean, depth?: number): T;
|
||||
/**
|
||||
* @param obj the object that you want to clone
|
||||
*/
|
||||
clonePrototype<T>(obj: T): T;
|
||||
};
|
||||
|
||||
export = clone
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user