Added TS stubs for clone library.

This commit is contained in:
Kieran Simpson
2014-04-13 23:15:32 +10:00
parent b21bfb8121
commit ea1a5bc764
3 changed files with 27 additions and 0 deletions

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
clone/clone-tests.ts Normal file
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
clone/clone.d.ts vendored Normal file
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
}