From 8a794e8e1b9ddf7a3a0c3f5a2bb4c6a118d776dd Mon Sep 17 00:00:00 2001 From: Rebecca Stevens Date: Mon, 14 Feb 2022 22:53:58 +1300 Subject: [PATCH] fix(DeepEqualAssertion): allow Actual to extend Expected rather requiring that it must be the other way around fix #2964 --- types/assertions.d.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/types/assertions.d.ts b/types/assertions.d.ts index 657ed3d486..8df254f67d 100644 --- a/types/assertions.d.ts +++ b/types/assertions.d.ts @@ -137,6 +137,12 @@ export interface DeepEqualAssertion { * `expected`, returning a boolean indicating whether the assertion passed. */ (actual: Actual, expected: Expected, message?: string): actual is Expected; + + /** + * Assert that `actual` is [deeply equal](https://github.com/concordancejs/concordance#comparison-details) to + * `expected`, returning a boolean indicating whether the assertion passed. + */ + (actual: Actual, expected: Expected, message?: string): expected is Actual; /** Skip this assertion. */ skip(actual: any, expected: any, message?: string): void;