Skip to content

Commit 7973475

Browse files
committed
Ignore the type for the catch declaration.
1 parent ae05d07 commit 7973475

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

CSharpToJavaScript/WithoutSemanticRewriter.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,12 @@ public WithoutSemanticRewriter(CSTOJSOptions options)
407407

408408
return obj;
409409
}
410+
public override SyntaxNode? VisitCatchDeclaration(CatchDeclarationSyntax node)
411+
{
412+
node = (CatchDeclarationSyntax)base.VisitCatchDeclaration(node)!;
413+
node = node.ReplaceNode(node.Type, SyntaxFactory.IdentifierName(""));
414+
return node;
415+
}
410416
public override SyntaxNode? VisitCastExpression(CastExpressionSyntax node)
411417
{
412418
return node.Expression;

0 commit comments

Comments
 (0)