mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-01 09:01:45 +08:00
added definitions for assertion-error
This commit is contained in:
15
assertion-error/assertion-error-tests.d.ts
vendored
Normal file
15
assertion-error/assertion-error-tests.d.ts
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
/// <reference path="assertion-error.d.ts" />
|
||||
|
||||
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);
|
||||
|
||||
15
assertion-error/assertion-error.d.ts
vendored
Normal file
15
assertion-error/assertion-error.d.ts
vendored
Normal file
@@ -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 <https://github.com/Bartvds>
|
||||
// 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;
|
||||
}
|
||||
Reference in New Issue
Block a user