We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d85436e commit 798d12bCopy full SHA for 798d12b
internal/transformers/tstransforms/runtimesyntax.go
@@ -309,6 +309,10 @@ func (tx *RuntimeSyntaxTransformer) addVarForDeclaration(statements []*ast.State
309
}
310
311
func (tx *RuntimeSyntaxTransformer) visitEnumDeclaration(node *ast.EnumDeclaration) *ast.Node {
312
+ if ast.IsEnumConst(node.AsNode()) && tx.compilerOptions.PreserveConstEnums.IsFalse() {
313
+ return tx.Factory().NewNotEmittedStatement()
314
+ }
315
+
316
statements := []*ast.Statement{}
317
318
// If needed, we should emit a variable declaration for the enum:
0 commit comments