mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-10-26 12:10:44 +08:00
Added TS stubs for clone library.
This commit is contained in:
1 parent
b21bfb8121
commit
ea1a5bc764
3 files changed
+27
No files matched your search
@@ -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