From 2de5deb92641d340498f9ca4197783fbdfbfd174 Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Fri, 25 Jun 2021 11:27:17 -0700 Subject: [PATCH] cherry-pick(release-1.12): move OverriddenExpectProperties outside the namespace (#7322) PR #7319 SHA 9f3bccc20011ba9e7902d22e77f5ecb89d58bce5 Co-authored-by: Max Schmitt --- types/testExpect.d.ts | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/types/testExpect.d.ts b/types/testExpect.d.ts index e386583919..59541a7068 100644 --- a/types/testExpect.d.ts +++ b/types/testExpect.d.ts @@ -29,17 +29,18 @@ export declare type Expect = { stringMatching(expected: string | RegExp): AsymmetricMatcher; }; +type OverriddenExpectProperties = +'not' | +'resolves' | +'rejects' | +'toMatchInlineSnapshot' | +'toThrowErrorMatchingInlineSnapshot' | +'toMatchSnapshot' | +'toThrowErrorMatchingSnapshot'; + declare global { export namespace PlaywrightTest { - type OverriddenProperties = - 'not' | - 'resolves' | - 'rejects' | - 'toMatchInlineSnapshot' | - 'toThrowErrorMatchingInlineSnapshot' | - 'toMatchSnapshot' | - 'toThrowErrorMatchingSnapshot'; - export interface Matchers extends Omit, OverriddenProperties> { + export interface Matchers extends Omit, OverriddenExpectProperties> { /** * If you know how to test something, `.not` lets you test its opposite. */