JsModule { bom_token: missing (optional), interpreter_token: missing (optional), directives: JsDirectiveList [], items: JsModuleItemList [ JsBogusStatement { items: [ ENUM_KW@0..5 "enum" [] [Whitespace(" ")], JsIdentifierBinding { name_token: IDENT@5..7 "A" [] [Whitespace(" ")], }, L_CURLY@7..8 "{" [] [], TsEnumMemberList [], R_CURLY@8..9 "}" [] [], ], }, ], eof_token: EOF@9..10 "" [Newline("\n")] [], } 0: JS_MODULE@0..10 0: (empty) 1: (empty) 2: JS_DIRECTIVE_LIST@0..0 3: JS_MODULE_ITEM_LIST@0..9 0: JS_BOGUS_STATEMENT@0..9 0: ENUM_KW@0..5 "enum" [] [Whitespace(" ")] 1: JS_IDENTIFIER_BINDING@5..7 0: IDENT@5..7 "A" [] [Whitespace(" ")] 2: L_CURLY@7..8 "{" [] [] 3: TS_ENUM_MEMBER_LIST@8..8 4: R_CURLY@8..9 "}" [] [] 4: EOF@9..10 "" [Newline("\n")] [] -- enum_in_js.js:1:1 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × 'enum's are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax. > 1 │ enum A {} │ ^^^^^^^^^ 2 │ i TypeScript only syntax -- enum A {}