Correct assert module

This commit is contained in:
Paul Loyd
2013-11-24 01:44:37 +03:00
parent 8b853198c7
commit c3541fe0b9

23
node/node.d.ts vendored
View File

@@ -1075,10 +1075,21 @@ declare module "util" {
}
declare module "assert" {
function internal (booleanValue: boolean, message?: string): void;
function internal (value: any, message?: string): void;
module internal {
export function fail(actual: any, expected: any, message: string, operator: string): void;
export function assert(value: any, message: string): void;
export class AssertionError implements Error {
name: string;
message: string;
actual: any;
expected: any;
operator: string;
generatedMessage: boolean;
constructor(options?: {message?: string; actual?: any; expected?: any;
operator?: string; stackStartFunction?: Function});
}
export function fail(actual?: any, expected?: any, message?: string, operator?: string): void;
export function ok(value: any, message?: string): void;
export function equal(actual: any, expected: any, message?: string): void;
export function notEqual(actual: any, expected: any, message?: string): void;
@@ -1086,8 +1097,10 @@ declare module "assert" {
export function notDeepEqual(acutal: any, expected: any, message?: string): void;
export function strictEqual(actual: any, expected: any, message?: string): void;
export function notStrictEqual(actual: any, expected: any, message?: string): void;
export function throws(block: any, error?: any, messsage?: string): void;
export function doesNotThrow(block: any, error?: any, messsage?: string): void;
export function throws(block: Function, error?: Function, message?: string): void;
export function throws(block: Function, error?: RegExp, message?: string): void;
export function throws(block: Function, error?: (err: any) => boolean, message?: string): void;
export function doesNotThrow(block: Function, message?: string): void;
export function ifError(value: any): void;
}