JsModule { bom_token: missing (optional), interpreter_token: missing (optional), directives: JsDirectiveList [], items: JsModuleItemList [ JsBogusStatement { items: [ JsDecoratorList [], EXPORT_KW@0..7 "export" [] [Whitespace(" ")], JsBogus { items: [ DEFAULT_KW@7..15 "default" [] [Whitespace(" ")], TsEnumDeclaration { const_token: missing (optional), enum_token: ENUM_KW@15..20 "enum" [] [Whitespace(" ")], id: JsIdentifierBinding { name_token: IDENT@20..22 "A" [] [Whitespace(" ")], }, l_curly_token: L_CURLY@22..24 "{" [] [Whitespace(" ")], members: TsEnumMemberList [ TsEnumMember { name: JsLiteralMemberName { value: IDENT@24..25 "X" [] [], }, initializer: missing (optional), }, COMMA@25..27 "," [] [Whitespace(" ")], TsEnumMember { name: JsLiteralMemberName { value: IDENT@27..28 "Y" [] [], }, initializer: missing (optional), }, COMMA@28..30 "," [] [Whitespace(" ")], TsEnumMember { name: JsLiteralMemberName { value: IDENT@30..32 "Z" [] [Whitespace(" ")], }, initializer: missing (optional), }, ], r_curly_token: R_CURLY@32..33 "}" [] [], }, ], }, ], }, ], eof_token: EOF@33..34 "" [Newline("\n")] [], } 0: JS_MODULE@0..34 0: (empty) 1: (empty) 2: JS_DIRECTIVE_LIST@0..0 3: JS_MODULE_ITEM_LIST@0..33 0: JS_BOGUS_STATEMENT@0..33 0: JS_DECORATOR_LIST@0..0 1: EXPORT_KW@0..7 "export" [] [Whitespace(" ")] 2: JS_BOGUS@7..33 0: DEFAULT_KW@7..15 "default" [] [Whitespace(" ")] 1: TS_ENUM_DECLARATION@15..33 0: (empty) 1: ENUM_KW@15..20 "enum" [] [Whitespace(" ")] 2: JS_IDENTIFIER_BINDING@20..22 0: IDENT@20..22 "A" [] [Whitespace(" ")] 3: L_CURLY@22..24 "{" [] [Whitespace(" ")] 4: TS_ENUM_MEMBER_LIST@24..32 0: TS_ENUM_MEMBER@24..25 0: JS_LITERAL_MEMBER_NAME@24..25 0: IDENT@24..25 "X" [] [] 1: (empty) 1: COMMA@25..27 "," [] [Whitespace(" ")] 2: TS_ENUM_MEMBER@27..28 0: JS_LITERAL_MEMBER_NAME@27..28 0: IDENT@27..28 "Y" [] [] 1: (empty) 3: COMMA@28..30 "," [] [Whitespace(" ")] 4: TS_ENUM_MEMBER@30..32 0: JS_LITERAL_MEMBER_NAME@30..32 0: IDENT@30..32 "Z" [] [Whitespace(" ")] 1: (empty) 5: R_CURLY@32..33 "}" [] [] 4: EOF@33..34 "" [Newline("\n")] [] -- ts_export_default_enum.ts:1:16 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × 'export default' isn't allowed for 'enum's. Move the 'enum' declaration in its own statement and then export the enum's name. > 1 │ export default enum A { X, Y, Z } │ ^^^^^^^^^^^^^^^^^^ 2 │ -- export default enum A { X, Y, Z }