From 52410f6f389586942d6427bbf66ac2bf4a9cf04b Mon Sep 17 00:00:00 2001 From: Karol Janyst Date: Tue, 25 Oct 2016 19:38:44 +0900 Subject: [PATCH] Add definitions for es6-error (#12116) --- es6-error/es6-error-tests.ts | 15 +++++++++++++++ es6-error/es6-error.d.ts | 8 ++++++++ 2 files changed, 23 insertions(+) create mode 100644 es6-error/es6-error-tests.ts create mode 100644 es6-error/es6-error.d.ts diff --git a/es6-error/es6-error-tests.ts b/es6-error/es6-error-tests.ts new file mode 100644 index 0000000000..a7f8ac6e25 --- /dev/null +++ b/es6-error/es6-error-tests.ts @@ -0,0 +1,15 @@ +// ES6 Error Test +// ================================================================================ +/// + +// Imports +// -------------------------------------------------------------------------------- +import * as ExtendableError from "es6-error" + +class TestError extends ExtendableError { + constructor (message: string = "TestError") { + super(message) + } +} + +throw new TestError("Test Message") diff --git a/es6-error/es6-error.d.ts b/es6-error/es6-error.d.ts new file mode 100644 index 0000000000..ce987f1a2f --- /dev/null +++ b/es6-error/es6-error.d.ts @@ -0,0 +1,8 @@ +// Type definitions for es6-error v4.0.0 +// Project: https://github.com/bjyoungblood/es6-error +// Definitions by: Karol Janyst +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare module "es6-error" { + export = Error +}