diff --git a/README.md b/README.md index f86f72820e..3472f264b8 100755 --- a/README.md +++ b/README.md @@ -57,6 +57,7 @@ List of Definitions * [Chrome](http://developer.chrome.com/extensions/) (by [Matthew Kimber](https://github.com/matthewkimber) and [otiai10](https://github.com/otiai10)) * [Chrome App](http://developer.chrome.com/apps/) (by [Adam Lay](https://github.com/AdamLay)) * [CKEditor](https://github.com/ckeditor/ckeditor-dev) (by [Ondrej Sevcik](https://github.com/ondrejsevcik)) +* [Clone](https://github.com/pvorb/node-clone) (by [Kieran Simpson](https://github.com/kierans)) * [CodeMirror](http://codemirror.net) (by [François de Campredon](https://github.com/fdecampredon)) * [Commander](http://github.com/visionmedia/commander.js) (by [Marcelo Dezem](https://github.com/mdezem)) * [configstore](http://github.com/yeoman/configstore) (by [Bart van der Schoor](https://github.com/Bartvds)) diff --git a/clone/clone-tests.ts b/clone/clone-tests.ts new file mode 100644 index 0000000000..12a8535349 --- /dev/null +++ b/clone/clone-tests.ts @@ -0,0 +1,9 @@ +import clone = require("clone"); + +var original = { + key: "value" +}; + +var copy = clone(original); +copy = clone(original, false); +copy = clone(original, true); diff --git a/clone/clone.d.ts b/clone/clone.d.ts new file mode 100644 index 0000000000..061c93c4d6 --- /dev/null +++ b/clone/clone.d.ts @@ -0,0 +1,17 @@ +// Type definitions for clone 0.1.11 +// Project: https://github.com/pvorb/node-clone +// Definitions by: Kieran Simpson +// 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 +}