/// interface ChaiAsPromised extends Chai.ChaiPlugin { transferPromiseness(assertion: Chai.PromisedAssertion, promise: PromiseLike): void; transformAsserterArgs(values: any[]): any; } declare const chaiAsPromised: ChaiAsPromised; export default chaiAsPromised; declare global { export namespace Chai { // For BDD API interface Assertion extends LanguageChains, NumericComparison, TypeComparison { eventually: PromisedAssertion; become(expected: any): PromisedAssertion; fulfilled: PromisedAssertion; rejected: PromisedAssertion; rejectedWith: PromisedThrow; notify(fn: Function): PromisedAssertion; } // Eventually does not have .then(), but PromisedAssertion have. interface Eventually extends PromisedLanguageChains, PromisedNumericComparison, PromisedTypeComparison { // From chai-as-promised become(expected: any): PromisedAssertion; fulfilled: PromisedAssertion; rejected: PromisedAssertion; rejectedWith: PromisedThrow; notify(fn: Function): PromisedAssertion; // From chai not: PromisedAssertion; deep: PromisedDeep; ordered: PromisedOrdered; nested: PromisedNested; any: PromisedKeyFilter; all: PromisedKeyFilter; a: PromisedTypeComparison; an: PromisedTypeComparison; include: PromisedInclude; contain: PromisedInclude; ok: PromisedAssertion; true: PromisedAssertion; false: PromisedAssertion; null: PromisedAssertion; undefined: PromisedAssertion; NaN: PromisedAssertion; exist: PromisedAssertion; empty: PromisedAssertion; arguments: PromisedAssertion; Arguments: PromisedAssertion; equal: PromisedEqual; equals: PromisedEqual; eq: PromisedEqual; eql: PromisedEqual; eqls: PromisedEqual; property: PromisedProperty; ownProperty: PromisedOwnProperty; haveOwnProperty: PromisedOwnProperty; ownPropertyDescriptor: PromisedOwnPropertyDescriptor; haveOwnPropertyDescriptor: PromisedOwnPropertyDescriptor; length: PromisedLength; lengthOf: PromisedLength; match: PromisedMatch; matches: PromisedMatch; string(string: string, message?: string): PromisedAssertion; keys: PromisedKeys; key(string: string): PromisedAssertion; throw: PromisedThrow; throws: PromisedThrow; Throw: PromisedThrow; respondTo: PromisedRespondTo; respondsTo: PromisedRespondTo; itself: PromisedAssertion; satisfy: PromisedSatisfy; satisfies: PromisedSatisfy; closeTo: PromisedCloseTo; approximately: PromisedCloseTo; members: PromisedMembers; increase: PromisedPropertyChange; increases: PromisedPropertyChange; decrease: PromisedPropertyChange; decreases: PromisedPropertyChange; change: PromisedPropertyChange; changes: PromisedPropertyChange; extensible: PromisedAssertion; sealed: PromisedAssertion; frozen: PromisedAssertion; oneOf(list: any[], message?: string): PromisedAssertion; } interface PromisedAssertion extends Eventually, PromiseLike { } interface PromisedLanguageChains { eventually: Eventually; // From chai to: PromisedAssertion; be: PromisedAssertion; been: PromisedAssertion; is: PromisedAssertion; that: PromisedAssertion; which: PromisedAssertion; and: PromisedAssertion; has: PromisedAssertion; have: PromisedAssertion; with: PromisedAssertion; at: PromisedAssertion; of: PromisedAssertion; same: PromisedAssertion; but: PromisedAssertion; does: PromisedAssertion; } interface PromisedNumericComparison { above: PromisedNumberComparer; gt: PromisedNumberComparer; greaterThan: PromisedNumberComparer; least: PromisedNumberComparer; gte: PromisedNumberComparer; below: PromisedNumberComparer; lt: PromisedNumberComparer; lessThan: PromisedNumberComparer; most: PromisedNumberComparer; lte: PromisedNumberComparer; within(start: number, finish: number, message?: string): PromisedAssertion; } interface PromisedNumberComparer { (value: number, message?: string): PromisedAssertion; } interface PromisedTypeComparison { (type: string, message?: string): PromisedAssertion; instanceof: PromisedInstanceOf; instanceOf: PromisedInstanceOf; } interface PromisedInstanceOf { (constructor: Object, message?: string): PromisedAssertion; } interface PromisedCloseTo { (expected: number, delta: number, message?: string): PromisedAssertion; } interface PromisedNested { include: PromisedInclude; property: PromisedProperty; members: PromisedMembers; } interface PromisedDeep { equal: PromisedEqual; equals: PromisedEqual; eq: PromisedEqual; include: PromisedInclude; property: PromisedProperty; members: PromisedMembers; ordered: PromisedOrdered; } interface PromisedOrdered { members: PromisedMembers; } interface PromisedKeyFilter { keys: PromisedKeys; } interface PromisedEqual { (value: any, message?: string): PromisedAssertion; } interface PromisedProperty { (name: string | symbol, value?: any, message?: string): PromisedAssertion; } interface PromisedOwnProperty { (name: string | symbol, message?: string): PromisedAssertion; } interface PromisedOwnPropertyDescriptor { (name: string | symbol, descriptor: PropertyDescriptor, message?: string): PromisedAssertion; (name: string | symbol, message?: string): PromisedAssertion; } interface PromisedLength extends PromisedLanguageChains, PromisedNumericComparison { (length: number, message?: string): PromisedAssertion; } interface PromisedInclude { (value: Object, message?: string): PromisedAssertion; (value: string, message?: string): PromisedAssertion; (value: number, message?: string): PromisedAssertion; keys: PromisedKeys; deep: PromisedDeep; ordered: PromisedOrdered; members: PromisedMembers; any: PromisedKeyFilter; all: PromisedKeyFilter; } interface PromisedMatch { (regexp: RegExp | string, message?: string): PromisedAssertion; } interface PromisedKeys { (...keys: string[]): PromisedAssertion; (keys: any[]): PromisedAssertion; (keys: Object): PromisedAssertion; } interface PromisedThrow { (): PromisedAssertion; (expected: string | RegExp, message?: string): PromisedAssertion; (constructor: Error | Function, expected?: string | RegExp, message?: string): PromisedAssertion; } interface PromisedRespondTo { (method: string, message?: string): PromisedAssertion; } interface PromisedSatisfy { (matcher: Function, message?: string): PromisedAssertion; } interface PromisedMembers { (set: any[], message?: string): PromisedAssertion; } interface PromisedPropertyChange { (object: Object, property: string, message?: string): PromisedAssertion; } // For Assert API interface Assert { eventually: PromisedAssert; isFulfilled(promise: PromiseLike, message?: string): PromiseLike; becomes(promise: PromiseLike, expected: any, message?: string): PromiseLike; doesNotBecome(promise: PromiseLike, expected: any, message?: string): PromiseLike; isRejected(promise: PromiseLike, message?: string): PromiseLike; isRejected(promise: PromiseLike, expected: any, message?: string): PromiseLike; isRejected(promise: PromiseLike, match: RegExp, message?: string): PromiseLike; notify(fn: Function): PromiseLike; } export interface PromisedAssert { fail(actual?: PromiseLike, expected?: any, msg?: string, operator?: string): PromiseLike; isOk(val: PromiseLike, msg?: string): PromiseLike; ok(val: PromiseLike, msg?: string): PromiseLike; isNotOk(val: PromiseLike, msg?: string): PromiseLike; notOk(val: PromiseLike, msg?: string): PromiseLike; equal(act: PromiseLike, exp: any, msg?: string): PromiseLike; notEqual(act: PromiseLike, exp: any, msg?: string): PromiseLike; strictEqual(act: PromiseLike, exp: any, msg?: string): PromiseLike; notStrictEqual(act: PromiseLike, exp: any, msg?: string): PromiseLike; deepEqual(act: PromiseLike, exp: any, msg?: string): PromiseLike; notDeepEqual(act: PromiseLike, exp: any, msg?: string): PromiseLike; isAbove(val: PromiseLike, above: number, msg?: string): PromiseLike; isAtLeast(val: PromiseLike, atLeast: number, msg?: string): PromiseLike; isAtBelow(val: PromiseLike, below: number, msg?: string): PromiseLike; isAtMost(val: PromiseLike, atMost: number, msg?: string): PromiseLike; isTrue(val: PromiseLike, msg?: string): PromiseLike; isFalse(val: PromiseLike, msg?: string): PromiseLike; isNotTrue(val: PromiseLike, msg?: string): PromiseLike; isNotFalse(val: PromiseLike, msg?: string): PromiseLike; isNull(val: PromiseLike, msg?: string): PromiseLike; isNotNull(val: PromiseLike, msg?: string): PromiseLike; isNaN(val: PromiseLike, msg?: string): PromiseLike; isNotNaN(val: PromiseLike, msg?: string): PromiseLike; exists(val: PromiseLike, msg?: string): PromiseLike; notExists(val: PromiseLike, msg?: string): PromiseLike; isUndefined(val: PromiseLike, msg?: string): PromiseLike; isDefined(val: PromiseLike, msg?: string): PromiseLike; isFunction(val: PromiseLike, msg?: string): PromiseLike; isNotFunction(val: PromiseLike, msg?: string): PromiseLike; isObject(val: PromiseLike, msg?: string): PromiseLike; isNotObject(val: PromiseLike, msg?: string): PromiseLike; isArray(val: PromiseLike, msg?: string): PromiseLike; isNotArray(val: PromiseLike, msg?: string): PromiseLike; isString(val: PromiseLike, msg?: string): PromiseLike; isNotString(val: PromiseLike, msg?: string): PromiseLike; isNumber(val: PromiseLike, msg?: string): PromiseLike; isNotNumber(val: PromiseLike, msg?: string): PromiseLike; isFinite(val: PromiseLike, msg?: string): PromiseLike; isBoolean(val: PromiseLike, msg?: string): PromiseLike; isNotBoolean(val: PromiseLike, msg?: string): PromiseLike; typeOf(val: PromiseLike, type: string, msg?: string): PromiseLike; notTypeOf(val: PromiseLike, type: string, msg?: string): PromiseLike; instanceOf(val: PromiseLike, type: Function, msg?: string): PromiseLike; notInstanceOf(val: PromiseLike, type: Function, msg?: string): PromiseLike; include(exp: PromiseLike, inc: any, msg?: string): PromiseLike; include(exp: PromiseLike, inc: any, msg?: string): PromiseLike; notInclude(exp: PromiseLike, inc: any, msg?: string): PromiseLike; notInclude(exp: PromiseLike, inc: any, msg?: string): PromiseLike; deepInclude(exp: PromiseLike, inc: any, msg?: string): PromiseLike; deepInclude(exp: PromiseLike, inc: any, msg?: string): PromiseLike; notDeepInclude(exp: PromiseLike, inc: any, msg?: string): PromiseLike; notDeepInclude(exp: PromiseLike, inc: any, msg?: string): PromiseLike; nestedInclude(exp: PromiseLike, inc: Object, msg?: string): PromiseLike; notNestedInclude(exp: PromiseLike, inc: Object, msg?: string): PromiseLike; deepNestedInclude(exp: PromiseLike, inc: Object, msg?: string): PromiseLike; notDeepNestedInclude(exp: PromiseLike, inc: Object, msg?: string): PromiseLike; ownInclude(exp: PromiseLike, inc: Object, msg?: string): PromiseLike; notOwnInclude(exp: PromiseLike, inc: Object, msg?: string): PromiseLike; deepOwnInclude(exp: PromiseLike, inc: Object, msg?: string): PromiseLike; notDeepOwnInclude(exp: PromiseLike, inc: Object, msg?: string): PromiseLike; match(exp: PromiseLike, re: RegExp, msg?: string): PromiseLike; notMatch(exp: PromiseLike, re: RegExp, msg?: string): PromiseLike; property(obj: PromiseLike, prop: string, msg?: string): PromiseLike; notProperty(obj: PromiseLike, prop: string, msg?: string): PromiseLike; deepProperty(obj: PromiseLike, prop: string, msg?: string): PromiseLike; notDeepProperty(obj: PromiseLike, prop: string, msg?: string): PromiseLike; propertyVal(obj: PromiseLike, prop: string, val: any, msg?: string): PromiseLike; propertyNotVal(obj: PromiseLike, prop: string, val: any, msg?: string): PromiseLike; deepPropertyVal(obj: PromiseLike, prop: string, val: any, msg?: string): PromiseLike; deepPropertyNotVal(obj: PromiseLike, prop: string, val: any, msg?: string): PromiseLike; nestedProperty(obj: PromiseLike, prop: string, msg?: string): PromiseLike; notNestedProperty(obj: PromiseLike, prop: string, msg?: string): PromiseLike; nestedPropertyVal(obj: PromiseLike, prop: string, val: any, msg?: string): PromiseLike; notNestedPropertyVal(obj: PromiseLike, prop: string, val: any, msg?: string): PromiseLike; deepNestedPropertyVal(obj: PromiseLike, prop: string, val: any, msg?: string): PromiseLike; notDeepNestedPropertyVal(obj: PromiseLike, prop: string, val: any, msg?: string): PromiseLike; lengthOf(exp: PromiseLike, len: number, msg?: string): PromiseLike; hasAnyKeys(obj: PromiseLike, keys: any[], msg?: string): PromiseLike; hasAnyKeys(obj: PromiseLike, keys: object, msg?: string): PromiseLike; hasAllKeys(obj: PromiseLike, keys: any[], msg?: string): PromiseLike; hasAllKeys(obj: PromiseLike, keys: object, msg?: string): PromiseLike; containsAllKeys(obj: PromiseLike, keys: any[], msg?: string): PromiseLike; containsAllKeys(obj: PromiseLike, keys: object, msg?: string): PromiseLike; doesNotHaveAnyKeys(obj: PromiseLike, keys: any[], msg?: string): PromiseLike; doesNotHaveAnyKeys(obj: PromiseLike, keys: object, msg?: string): PromiseLike; doesNotHaveAllKeys(obj: PromiseLike, keys: any[], msg?: string): PromiseLike; doesNotHaveAllKeys(obj: PromiseLike, keys: object, msg?: string): PromiseLike; hasAnyDeepKeys(obj: PromiseLike, keys: any[], msg?: string): PromiseLike; hasAnyDeepKeys(obj: PromiseLike, keys: object, msg?: string): PromiseLike; hasAllDeepKeys(obj: PromiseLike, keys: any[], msg?: string): PromiseLike; hasAllDeepKeys(obj: PromiseLike, keys: object, msg?: string): PromiseLike; containsAllDeepKeys(obj: PromiseLike, keys: any[], msg?: string): PromiseLike; containsAllDeepKeys(obj: PromiseLike, keys: object, msg?: string): PromiseLike; doesNotHaveAnyDeepKeys(obj: PromiseLike, keys: any[], msg?: string): PromiseLike; doesNotHaveAnyDeepKeys(obj: PromiseLike, keys: object, msg?: string): PromiseLike; doesNotHaveAllDeepKeys(obj: PromiseLike, keys: any[], msg?: string): PromiseLike; doesNotHaveAllDeepKeys(obj: PromiseLike, keys: object, msg?: string): PromiseLike; // alias frenzy throw(fn: Function, msg?: string): PromiseLike; throw(fn: Function, regExp: RegExp): PromiseLike; throw(fn: Function, errType: Function, msg?: string): PromiseLike; throw(fn: Function, errType: Function, regExp: RegExp): PromiseLike; throws(fn: Function, msg?: string): PromiseLike; throws(fn: Function, regExp: RegExp): PromiseLike; throws(fn: Function, errType: Function, msg?: string): PromiseLike; throws(fn: Function, errType: Function, regExp: RegExp): PromiseLike; Throw(fn: Function, msg?: string): PromiseLike; Throw(fn: Function, regExp: RegExp): PromiseLike; Throw(fn: Function, errType: Function, msg?: string): PromiseLike; Throw(fn: Function, errType: Function, regExp: RegExp): PromiseLike; doesNotThrow(fn: Function, msg?: string): PromiseLike; doesNotThrow(fn: Function, regExp: RegExp): PromiseLike; doesNotThrow(fn: Function, errType: Function, msg?: string): PromiseLike; doesNotThrow(fn: Function, errType: Function, regExp: RegExp): PromiseLike; operator(val: PromiseLike, operator: string, val2: any, msg?: string): PromiseLike; closeTo(act: PromiseLike, exp: number, delta: number, msg?: string): PromiseLike; approximately(act: PromiseLike, exp: number, delta: number, msg?: string): PromiseLike; sameMembers(set1: PromiseLike, set2: any[], msg?: string): PromiseLike; sameDeepMembers(set1: PromiseLike, set2: any[], msg?: string): PromiseLike; sameOrderedMembers(set1: PromiseLike, set2: any[], msg?: string): PromiseLike; notSameOrderedMembers(set1: PromiseLike, set2: any[], msg?: string): PromiseLike; sameDeepOrderedMembers(set1: PromiseLike, set2: any[], msg?: string): PromiseLike; notSameDeepOrderedMembers(set1: PromiseLike, set2: any[], msg?: string): PromiseLike; includeOrderedMembers(set1: PromiseLike, set2: any[], msg?: string): PromiseLike; notIncludeOrderedMembers(set1: PromiseLike, set2: any[], msg?: string): PromiseLike; includeDeepOrderedMembers(set1: PromiseLike, set2: any[], msg?: string): PromiseLike; notIncludeDeepOrderedMembers(set1: PromiseLike, set2: any[], msg?: string): PromiseLike; includeMembers(set1: PromiseLike, set2: any[], msg?: string): PromiseLike; includeDeepMembers(set1: PromiseLike, set2: any[], msg?: string): PromiseLike; oneOf(val: PromiseLike, list: any[], msg?: string): PromiseLike; changes(modifier: Function, obj: Object, property: string, msg?: string): PromiseLike; changesBy( modifier: Function, obj: object, property: string, change: number, msg?: string, ): PromiseLike; doesNotChange(modifier: Function, obj: Object, property: string, msg?: string): PromiseLike; changesButNotBy( modifier: Function, obj: object, property: string, change: number, msg?: string, ): PromiseLike; increases(modifier: Function, obj: Object, property: string, msg?: string): PromiseLike; increasesBy( modifier: Function, obj: Object, property: string, change: number, msg?: string, ): PromiseLike; doesNotIncrease(modifier: Function, obj: Object, property: string, msg?: string): PromiseLike; increasesButNotBy( modifier: Function, obj: Object, property: string, change: number, msg?: string, ): PromiseLike; decreases(modifier: Function, obj: Object, property: string, msg?: string): PromiseLike; decreasesBy( modifier: Function, obj: Object, property: string, change: number, msg?: string, ): PromiseLike; doesNotDecrease(modifier: Function, obj: Object, property: string, msg?: string): PromiseLike; decreasesButNotBy( modifier: Function, obj: Object, property: string, change: number, msg?: string, ): PromiseLike; ifError(val: PromiseLike, msg?: string): PromiseLike; isExtensible(obj: PromiseLike, msg?: string): PromiseLike; isNotExtensible(obj: PromiseLike, msg?: string): PromiseLike; isSealed(obj: PromiseLike, msg?: string): PromiseLike; sealed(obj: PromiseLike, msg?: string): PromiseLike; isNotSealed(obj: PromiseLike, msg?: string): PromiseLike; notSealed(obj: PromiseLike, msg?: string): PromiseLike; isFrozen(obj: PromiseLike, msg?: string): PromiseLike; frozen(obj: PromiseLike, msg?: string): PromiseLike; isNotFrozen(obj: PromiseLike, msg?: string): PromiseLike; notFrozen(obj: PromiseLike, msg?: string): PromiseLike; isEmpty(val: PromiseLike, msg?: string): PromiseLike; isNotEmpty(val: PromiseLike, msg?: string): PromiseLike; } } }