From 655637f6113fbb575286b7aa7cd26cf2860d72c9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 25 Jul 2025 14:08:19 +0000 Subject: [PATCH] Add test case for isolated declarations function expression issue Co-authored-by: jakebailey <5341706+jakebailey@users.noreply.github.com> --- ...tedDeclarationsFunctionExpressionInCall.ts | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 tests/cases/compiler/isolatedDeclarationsFunctionExpressionInCall.ts diff --git a/tests/cases/compiler/isolatedDeclarationsFunctionExpressionInCall.ts b/tests/cases/compiler/isolatedDeclarationsFunctionExpressionInCall.ts new file mode 100644 index 00000000000..514a9813e67 --- /dev/null +++ b/tests/cases/compiler/isolatedDeclarationsFunctionExpressionInCall.ts @@ -0,0 +1,21 @@ +// @isolatedDeclarations: true +// @declaration: true + +declare function observer(fn: T): T; +declare function action(fn: T): T; + +export const Component = observer(() => { + return "hello"; +}); + +export const thing = action(function () { + return Component; +}); + +export const arrowWithType = observer((): string => { + return "typed"; +}); + +export const functionWithType = action(function (): typeof Component { + return Component; +}); \ No newline at end of file