chai, chai-dom, chai-jquery: fix signature of match()/matches() methods (#23077)

* chai: fix signature of match()/matches() methods

* chai-dom: add missing assertions from recent minor versions

* chai-jquery: add missing declaration caused by changes to @types/chai
This commit is contained in:
smhxx 2018-01-23 12:32:16 -06:00 committed by Andy
parent 29a649e6ab
commit ec91c51a72
3 changed files with 23 additions and 1 deletions

View File

@ -23,6 +23,18 @@ declare namespace Chai {
value(text: string): Assertion;
empty: Assertion;
// exist, length, and contain are already defined in @types/chai and have the
// same type or a more general type, so don't need to be re-declared even though
// the implementation is different
descendant(element: string|HTMLElement): Assertion;
descendants(selector: string): Assertion;
displayed: Assertion;
}
interface Include {
@ -33,6 +45,12 @@ declare namespace Chai {
}
interface Match {
(selector: string): Assertion;
}
}
declare module "chai-dom" {

View File

@ -27,6 +27,10 @@ declare namespace Chai {
disabled(): Assertion;
(selector: string): Assertion;
}
interface Match {
(selector: string): Assertion;
}
}
/**

View File

@ -226,7 +226,7 @@ declare namespace Chai {
}
interface Match {
(regexp: RegExp|string, message?: string): Assertion;
(regexp: RegExp, message?: string): Assertion;
}
interface Keys {