cherry-pick(release-1.12): move OverriddenExpectProperties outside the namespace (#7322)

PR #7319 SHA 9f3bccc200

Co-authored-by: Max Schmitt <max@schmitt.mx>
This commit is contained in:
Andrey Lushnikov 2021-06-25 11:27:17 -07:00 committed by GitHub
parent 96fc610408
commit 2de5deb926
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -29,9 +29,7 @@ export declare type Expect = {
stringMatching(expected: string | RegExp): AsymmetricMatcher; stringMatching(expected: string | RegExp): AsymmetricMatcher;
}; };
declare global { type OverriddenExpectProperties =
export namespace PlaywrightTest {
type OverriddenProperties =
'not' | 'not' |
'resolves' | 'resolves' |
'rejects' | 'rejects' |
@ -39,7 +37,10 @@ declare global {
'toThrowErrorMatchingInlineSnapshot' | 'toThrowErrorMatchingInlineSnapshot' |
'toMatchSnapshot' | 'toMatchSnapshot' |
'toThrowErrorMatchingSnapshot'; 'toThrowErrorMatchingSnapshot';
export interface Matchers<R> extends Omit<expect.Matchers<R>, OverriddenProperties> {
declare global {
export namespace PlaywrightTest {
export interface Matchers<R> extends Omit<expect.Matchers<R>, OverriddenExpectProperties> {
/** /**
* If you know how to test something, `.not` lets you test its opposite. * If you know how to test something, `.not` lets you test its opposite.
*/ */