From f5f60a4cb3e54f560f623cf5000f7cdb471a4b24 Mon Sep 17 00:00:00 2001 From: Bart van der Schoor Date: Tue, 1 Apr 2014 01:08:27 +0200 Subject: [PATCH] added definitions for assertion-error --- assertion-error/assertion-error-tests.d.ts | 15 +++++++++++++++ assertion-error/assertion-error.d.ts | 15 +++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 assertion-error/assertion-error-tests.d.ts create mode 100644 assertion-error/assertion-error.d.ts 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; +}