mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-22 11:57:33 +08:00
Add definitions for es6-error (#12116)
This commit is contained in:
committed by
Masahiro Wakame
parent
cdcbb561a9
commit
52410f6f38
15
es6-error/es6-error-tests.ts
Normal file
15
es6-error/es6-error-tests.ts
Normal 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
8
es6-error/es6-error.d.ts
vendored
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user