JsModule { bom_token: missing (optional), interpreter_token: missing (optional), directives: JsDirectiveList [], items: JsModuleItemList [ JsBlockStatement { l_curly_token: L_CURLY@0..1 "{" [] [], statements: JsStatementList [ JsBogusStatement { items: [ JsDecoratorList [], EXPORT_KW@1..10 "export" [Newline("\n"), Whitespace(" ")] [Whitespace(" ")], JsExportNamedFromClause { type_token: missing (optional), l_curly_token: L_CURLY@10..12 "{" [] [Whitespace(" ")], specifiers: JsExportNamedFromSpecifierList [ JsExportNamedFromSpecifier { type_token: missing (optional), source_name: JsLiteralExportName { value: IDENT@12..17 "pain" [] [Whitespace(" ")], }, export_as: missing (optional), }, ], r_curly_token: R_CURLY@17..19 "}" [] [Whitespace(" ")], from_token: FROM_KW@19..24 "from" [] [Whitespace(" ")], source: JsModuleSource { value_token: JS_STRING_LITERAL@24..30 "\"life\"" [] [], }, assertion: missing (optional), semicolon_token: SEMICOLON@30..31 ";" [] [], }, ], }, ], r_curly_token: R_CURLY@31..33 "}" [Newline("\n")] [], }, ], 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_BLOCK_STATEMENT@0..33 0: L_CURLY@0..1 "{" [] [] 1: JS_STATEMENT_LIST@1..31 0: JS_BOGUS_STATEMENT@1..31 0: JS_DECORATOR_LIST@1..1 1: EXPORT_KW@1..10 "export" [Newline("\n"), Whitespace(" ")] [Whitespace(" ")] 2: JS_EXPORT_NAMED_FROM_CLAUSE@10..31 0: (empty) 1: L_CURLY@10..12 "{" [] [Whitespace(" ")] 2: JS_EXPORT_NAMED_FROM_SPECIFIER_LIST@12..17 0: JS_EXPORT_NAMED_FROM_SPECIFIER@12..17 0: (empty) 1: JS_LITERAL_EXPORT_NAME@12..17 0: IDENT@12..17 "pain" [] [Whitespace(" ")] 2: (empty) 3: R_CURLY@17..19 "}" [] [Whitespace(" ")] 4: FROM_KW@19..24 "from" [] [Whitespace(" ")] 5: JS_MODULE_SOURCE@24..30 0: JS_STRING_LITERAL@24..30 "\"life\"" [] [] 6: (empty) 7: SEMICOLON@30..31 ";" [] [] 2: R_CURLY@31..33 "}" [Newline("\n")] [] 4: EOF@33..34 "" [Newline("\n")] [] -- export_decl_not_top_level.js:2:2 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × Illegal use of an export declaration not at the top level 1 │ { > 2 │ export { pain } from "life"; │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 │ } 4 │ i move this declaration to the top level -- { export { pain } from "life"; }