diff --git a/assertion-error/assertion-error-tests.d.ts b/assertion-error/assertion-error-tests.d.ts new file mode 100644 index 0000000000..b2a33a307a --- /dev/null +++ b/assertion-error/assertion-error-tests.d.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, b2}); +e = new AssertionError(str, {a:1, b2}, 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; +}