mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-16 11:02:11 +08:00
Added TS stubs for clone library.
This commit is contained in:
@@ -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
9
clone/clone-tests.ts
Normal 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
17
clone/clone.d.ts
vendored
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user