Merge pull request #2034 from kierans/master

Added TS stubs for clone library.
This commit is contained in:
Basarat Ali Syed
2014-04-14 17:42:17 +10:00
3 changed files with 27 additions and 0 deletions
+1
View File
@@ -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))
+9
View File
@@ -0,0 +1,9 @@
import clone = require("clone");
var original = {
key: "value"
};
var copy = clone(original);
copy = clone(original, false);
copy = clone(original, true);
+17
View File
@@ -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
}