Skip to content

Commit db57163

Browse files
Apply PR#60980 fix: pass node.Parent instead of tx.enclosingDeclaration
Co-authored-by: RyanCavanaugh <[email protected]>
1 parent 45d227b commit db57163

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/transformers/declarations/transform.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1016,7 +1016,7 @@ func (tx *DeclarationTransformer) ensureType(node *ast.Node, ignorePrivate bool)
10161016

10171017
// Should be removed createTypeOfDeclaration will actually now reuse the existing annotation so there is no real need to duplicate type walking
10181018
// Left in for now to minimize diff during syntactic type node builder refactor
1019-
if !ast.IsExportAssignment(node) && !ast.IsBindingElement(node) && node.Type() != nil && (!ast.IsParameter(node) || !tx.resolver.RequiresAddingImplicitUndefined(node, nil, tx.enclosingDeclaration)) {
1019+
if !ast.IsExportAssignment(node) && !ast.IsBindingElement(node) && node.Type() != nil && (!ast.IsParameter(node) || !tx.resolver.RequiresAddingImplicitUndefined(node, nil, node.Parent)) {
10201020
return tx.Visitor().Visit(node.Type())
10211021
}
10221022

0 commit comments

Comments
 (0)