mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Added TS stubs for clone library.
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
import clone = require("clone");
|
||||
|
||||
var original = {
|
||||
key: "value"
|
||||
};
|
||||
|
||||
var copy = clone(original);
|
||||
copy = clone(original, false);
|
||||
copy = clone(original, true);
|
||||
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
// Type definitions for clone 0.1.11
|
||||
// Project: https://github.com/pvorb/node-clone
|
||||
// Definitions by: Kieran Simpson <https://github.com/kierans/DefinitelyTyped>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/**
|
||||
* 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
|
||||
|
||||
export = clone
|
||||
}
|
||||
Reference in New Issue
Block a user