diff --git a/assertion-error/assertion-error-tests.ts b/assertion-error/assertion-error-tests.ts new file mode 100644 index 0000000000..f03e9cb52e --- /dev/null +++ b/assertion-error/assertion-error-tests.ts @@ -0,0 +1,15 @@ +/// + +import AssertionError = require('assertion-error'); + +var e: AssertionError; +var str: string; + +function foo () { + +} + +e = new AssertionError(str); +e = new AssertionError(str, {a:1, b:2}); +e = new AssertionError(str, {a:1, b:2}, foo); + diff --git a/assertion-error/assertion-error.d.ts b/assertion-error/assertion-error.d.ts new file mode 100644 index 0000000000..5b63d63cf2 --- /dev/null +++ b/assertion-error/assertion-error.d.ts @@ -0,0 +1,15 @@ +// Type definitions for assertion-error 1.0 0 +// Project: https://github.com/chaijs/assertion-error +// Definitions by: Bart van der Schoor +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module 'assertion-error' { + class AssertionError implements Error { + constructor(message: string, props?: any, ssf?: Function); + name: string; + message: string; + showDiff: boolean; + stack: string; + } + export = AssertionError; +} diff --git a/buffer-equal/buffer-equal-tests.ts b/buffer-equal/buffer-equal-tests.ts new file mode 100644 index 0000000000..743ed187ec --- /dev/null +++ b/buffer-equal/buffer-equal-tests.ts @@ -0,0 +1,8 @@ +/// + +import bufferEqual = require('buffer-equal'); + +var bool: boolean; +var buf: NodeBuffer; + +bool = bufferEqual(buf, buf); diff --git a/buffer-equal/buffer-equal.d.ts b/buffer-equal/buffer-equal.d.ts new file mode 100644 index 0000000000..bc8b1ce28e --- /dev/null +++ b/buffer-equal/buffer-equal.d.ts @@ -0,0 +1,11 @@ +// Type definitions for buffer-equal 1.0 0 +// Project: https://github.com/chaijs/assertion-error +// Definitions by: Bart van der Schoor +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module 'buffer-equal' { + function bufferEqual(actual:NodeBuffer, expected:NodeBuffer): boolean; + export = bufferEqual; +} diff --git a/detect-indent/detect-indent-tests.ts b/detect-indent/detect-indent-tests.ts new file mode 100644 index 0000000000..4ee02471b8 --- /dev/null +++ b/detect-indent/detect-indent-tests.ts @@ -0,0 +1,8 @@ +/// + +import di = require('detect-indent'); + +var str: string; + +str = di(str); +str = di(str, str); diff --git a/detect-indent/detect-indent.d.ts b/detect-indent/detect-indent.d.ts new file mode 100644 index 0000000000..3ce72401dc --- /dev/null +++ b/detect-indent/detect-indent.d.ts @@ -0,0 +1,9 @@ +// Type definitions for detect-indent 0.1.3 +// Project: https://github.com/sindresorhus/detect-indent +// Definitions by: Bart van der Schoor +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module 'detect-indent' { + function DetectIndent (dir: string, alt?: string): string; + export = DetectIndent; +} diff --git a/exit/exit-tests.ts b/exit/exit-tests.ts new file mode 100644 index 0000000000..0b5b51dc8f --- /dev/null +++ b/exit/exit-tests.ts @@ -0,0 +1,5 @@ +/// + +import exit = require('exit'); + +exit(42); diff --git a/exit/exit.d.ts b/exit/exit.d.ts new file mode 100644 index 0000000000..103984d86c --- /dev/null +++ b/exit/exit.d.ts @@ -0,0 +1,9 @@ +// Type definitions for exit 0.1.2 +// Project: https://github.com/cowboy/node-exit +// Definitions by: Bart van der Schoor +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module 'exit' { + function exit(code: number): void; + export = exit; +} diff --git a/graceful-fs/graceful-fs-tests.ts b/graceful-fs/graceful-fs-tests.ts new file mode 100644 index 0000000000..ca0a5e7b83 --- /dev/null +++ b/graceful-fs/graceful-fs-tests.ts @@ -0,0 +1,8 @@ +/// + +import fs = require('graceful-fs'); + +var str: string; +var buf: NodeBuffer; + +fs.renameSync(str, str); \ No newline at end of file diff --git a/graceful-fs/graceful-fs.d.ts b/graceful-fs/graceful-fs.d.ts new file mode 100644 index 0000000000..e77dc8893c --- /dev/null +++ b/graceful-fs/graceful-fs.d.ts @@ -0,0 +1,11 @@ +// Type definitions for graceful-fs 2.0.0 +// Project: https://github.com/cowboy/graceful-fs +// Definitions by: Bart van der Schoor +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module 'graceful-fs' { + import fs = require('fs'); + export = fs; +} diff --git a/jsesc/jsesc-tests.ts b/jsesc/jsesc-tests.ts new file mode 100644 index 0000000000..355b2a7988 --- /dev/null +++ b/jsesc/jsesc-tests.ts @@ -0,0 +1,45 @@ +/// + +import jsesc = require('jsesc'); +import Opts = jsesc.Opts; + +// ---- ---- ---- ---- ---- ---- ---- + +var num: number; +var str: string; +var bool: boolean; +var opts: Opts; +var opts: Opts; + +// ---- ---- ---- ---- ---- ---- ---- + +str = jsesc.version; + +// ---- ---- ---- ---- ---- ---- ---- + +opts = { + quotes: str +}; +opts = { + wrap: bool +}; +opts = { + es6: bool +}; +opts = { + escapeEverything: bool +}; +opts = { + compact: bool +}; +opts = { + indent: str +}; +opts = { + json: bool +}; + +// ---- ---- ---- ---- ---- ---- ---- + +str = jsesc(str); +str = jsesc(str, opts); diff --git a/jsesc/jsesc.d.ts b/jsesc/jsesc.d.ts new file mode 100644 index 0000000000..76b40cf455 --- /dev/null +++ b/jsesc/jsesc.d.ts @@ -0,0 +1,25 @@ +// Type definitions for jsesc 0.4.3 +// Project: https://github.com/mathiasbynens/jsesc +// Definitions by: Bart van der Schoor +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module 'jsesc' { + + function jsesc(str: string, opts?: any): string; + + module jsesc { + var version: string; + + interface Opts { + quotes?: string; + wrap?: boolean; + es6?: boolean; + escapeEverything?: boolean; + compact?: boolean; + indent?: string; + json?: boolean; + } + } + + export = jsesc; +} diff --git a/mkdirp/mkdirp-tests.ts b/mkdirp/mkdirp-tests.ts new file mode 100644 index 0000000000..e256e61ada --- /dev/null +++ b/mkdirp/mkdirp-tests.ts @@ -0,0 +1,16 @@ +/// + +import mkdirp = require('mkdirp'); + +var str: string; +var num: number; + +mkdirp(str, num, (err, made) => { + str = made; +}); +mkdirp(str, (err, made) => { + str = made; +}); + +str = mkdirp.sync(str, num); +str = mkdirp.sync(str); \ No newline at end of file diff --git a/mkdirp/mkdirp.d.ts b/mkdirp/mkdirp.d.ts new file mode 100644 index 0000000000..c3fca38a2e --- /dev/null +++ b/mkdirp/mkdirp.d.ts @@ -0,0 +1,15 @@ +// Type definitions for mkdirp 0.3.0 +// Project: http://github.com/substack/node-mkdirp +// Definitions by: Bart van der Schoor +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module 'mkdirp' { + + function mkdirp(dir: string, cb: (err: any, made: string) => void): void; + function mkdirp(dir: string, flags: any, cb: (err: any, made: string) => void): void; + + module mkdirp { + function sync(dir: string, flags?: any): string; + } + export = mkdirp; +} diff --git a/open/open-tests.ts b/open/open-tests.ts new file mode 100644 index 0000000000..a529fa9cf2 --- /dev/null +++ b/open/open-tests.ts @@ -0,0 +1,6 @@ +/// + +import open = require('open'); + +open('foo'); +open('foo', 'bar'); diff --git a/open/open.d.ts b/open/open.d.ts new file mode 100644 index 0000000000..c32e80bfec --- /dev/null +++ b/open/open.d.ts @@ -0,0 +1,9 @@ +// Type definitions for open 0.0.3 +// Project: https://github.com/jjrdn/node-open +// Definitions by: Bart van der Schoor +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module 'open' { + function open(target: string, app?: string): void; + export = open; +} diff --git a/source-map-support/source-map-support-tests.ts b/source-map-support/source-map-support-tests.ts new file mode 100644 index 0000000000..ddd6308cc2 --- /dev/null +++ b/source-map-support/source-map-support-tests.ts @@ -0,0 +1,5 @@ +/// + +import sms = require('source-map-support'); + +sms.install(); diff --git a/source-map-support/source-map-support.d.ts b/source-map-support/source-map-support.d.ts new file mode 100644 index 0000000000..8d4e225796 --- /dev/null +++ b/source-map-support/source-map-support.d.ts @@ -0,0 +1,8 @@ +// Type definitions for source-map-support 0.2.5 +// Project: https://github.com/evanw/source-map-support +// Definitions by: Bart van der Schoor +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module 'source-map-support' { + export function install(): any; +}