From c051531dcb0fac4cbac2d7c8cda79b567cf7a95e Mon Sep 17 00:00:00 2001 From: Lenz Weber-Tronic Date: Tue, 23 Apr 2024 11:13:02 +0200 Subject: [PATCH] add return type to `withinDOM` implementation to prevent > The inferred type of 'withinDOM' cannot be named without a reference to '@testing-library/dom/node_modules/pretty-format'. This is likely not portable. A type annotation is necessary.ts(2742) --- src/testing/internal/profile/Render.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/testing/internal/profile/Render.tsx b/src/testing/internal/profile/Render.tsx index 0757392b26d..284594c9f51 100644 --- a/src/testing/internal/profile/Render.tsx +++ b/src/testing/internal/profile/Render.tsx @@ -124,7 +124,7 @@ export class RenderInstance implements Render { return (this._domSnapshot = body); } - get withinDOM() { + get withinDOM(): () => SyncScreen { const snapScreen = Object.assign(within(this.domSnapshot), { debug: ( ...[dom = this.domSnapshot, ...rest]: Parameters