Skip to content

Commit

Permalink
Update src/compiler/transformers/declarations/diagnostics.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Andarist authored Jan 16, 2025
1 parent 4589bee commit 1942b7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compiler/transformers/declarations/diagnostics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@ export function createGetIsolatedDeclarationErrors(resolver: EmitResolver): (nod
if (isSetAccessor(node.parent)) {
return createAccessorTypeError(node.parent);
}
const addUndefined = resolver.requiresAddingImplicitUndefined(node, findAncestor(node, isFunctionLikeDeclaration));
const addUndefined = resolver.requiresAddingImplicitUndefined(node, node.parent);
if (!addUndefined && node.initializer) {
return createExpressionError(node.initializer);
}
Expand Down

0 comments on commit 1942b7c

Please sign in to comment.