Add definitions for es6-error (#12116)

This commit is contained in:
Karol Janyst
2016-10-25 19:38:44 +09:00
committed by Masahiro Wakame
parent cdcbb561a9
commit 52410f6f38
2 changed files with 23 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
// ES6 Error Test
// ================================================================================
/// <reference path="es6-error.d.ts"/>
// Imports
// --------------------------------------------------------------------------------
import * as ExtendableError from "es6-error"
class TestError extends ExtendableError {
constructor (message: string = "TestError") {
super(message)
}
}
throw new TestError("Test Message")

8
es6-error/es6-error.d.ts vendored Normal file
View File

@@ -0,0 +1,8 @@
// Type definitions for es6-error v4.0.0
// Project: https://github.com/bjyoungblood/es6-error
// Definitions by: Karol Janyst <https://github.com/LKay>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare module "es6-error" {
export = Error
}