diff --git a/expect/expect.ts b/expect/expect.ts index 89090612fbbb..2008e096d5b8 100644 --- a/expect/expect.ts +++ b/expect/expect.ts @@ -141,7 +141,7 @@ export function expect(value: unknown, customMessage?: string): Expected { ...extendMatchers, ...matchers, }; - const matcher: Matcher = allMatchers[name as MatcherKey]; + const matcher = allMatchers[name as MatcherKey] as Matcher; if (!matcher) { throw new TypeError( typeof name === "string"