From 45d227b092e4f4b3d31fa9b6820eb6c48a8250a8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 9 Oct 2025 21:18:05 +0000 Subject: [PATCH 1/2] Initial plan From db571636de265f4bb560ef1618773cd6da49dc28 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 9 Oct 2025 21:33:49 +0000 Subject: [PATCH 2/2] Apply PR#60980 fix: pass node.Parent instead of tx.enclosingDeclaration Co-authored-by: RyanCavanaugh <6685088+RyanCavanaugh@users.noreply.github.com> --- internal/transformers/declarations/transform.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/transformers/declarations/transform.go b/internal/transformers/declarations/transform.go index 6217557d5f..be8789a10e 100644 --- a/internal/transformers/declarations/transform.go +++ b/internal/transformers/declarations/transform.go @@ -1016,7 +1016,7 @@ func (tx *DeclarationTransformer) ensureType(node *ast.Node, ignorePrivate bool) // Should be removed createTypeOfDeclaration will actually now reuse the existing annotation so there is no real need to duplicate type walking // Left in for now to minimize diff during syntactic type node builder refactor - if !ast.IsExportAssignment(node) && !ast.IsBindingElement(node) && node.Type() != nil && (!ast.IsParameter(node) || !tx.resolver.RequiresAddingImplicitUndefined(node, nil, tx.enclosingDeclaration)) { + if !ast.IsExportAssignment(node) && !ast.IsBindingElement(node) && node.Type() != nil && (!ast.IsParameter(node) || !tx.resolver.RequiresAddingImplicitUndefined(node, nil, node.Parent)) { return tx.Visitor().Visit(node.Type()) }