JsModule { bom_token: missing (optional), interpreter_token: missing (optional), directives: JsDirectiveList [], items: JsModuleItemList [ JsExpressionStatement { expression: JsImportCallExpression { import_token: IMPORT_KW@0..6 "import" [] [], arguments: JsCallArguments { l_paren_token: L_PAREN@6..7 "(" [] [], args: JsCallArgumentList [], r_paren_token: R_PAREN@7..8 ")" [] [], }, }, semicolon_token: missing (optional), }, JsExpressionStatement { expression: JsBogusExpression { items: [ IMPORT_KW@8..15 "import" [Newline("\n")] [], JsBogus { items: [ L_PAREN@15..16 "(" [] [], JsBogus { items: [ JsBogusMember { items: [ DOT3@16..19 "..." [] [], JsArrayExpression { l_brack_token: L_BRACK@19..20 "[" [] [], elements: JsArrayElementList [ JsStringLiteralExpression { value_token: JS_STRING_LITERAL@20..25 "\"foo\"" [] [], }, ], r_brack_token: R_BRACK@25..26 "]" [] [], }, ], }, ], }, R_PAREN@26..27 ")" [] [], ], }, ], }, semicolon_token: missing (optional), }, JsExpressionStatement { expression: JsImportCallExpression { import_token: IMPORT_KW@27..34 "import" [Newline("\n")] [], arguments: JsCallArguments { l_paren_token: L_PAREN@34..35 "(" [] [], args: JsCallArgumentList [ JsStringLiteralExpression { value_token: JS_STRING_LITERAL@35..40 "\"foo\"" [] [], }, COMMA@40..42 "," [] [Whitespace(" ")], JsObjectExpression { l_curly_token: L_CURLY@42..44 "{" [] [Whitespace(" ")], members: JsObjectMemberList [ JsPropertyObjectMember { name: JsLiteralMemberName { value: IDENT@44..50 "assert" [] [], }, colon_token: COLON@50..52 ":" [] [Whitespace(" ")], value: JsObjectExpression { l_curly_token: L_CURLY@52..54 "{" [] [Whitespace(" ")], members: JsObjectMemberList [ JsPropertyObjectMember { name: JsLiteralMemberName { value: IDENT@54..58 "type" [] [], }, colon_token: COLON@58..60 ":" [] [Whitespace(" ")], value: JsStringLiteralExpression { value_token: JS_STRING_LITERAL@60..67 "'json'" [] [Whitespace(" ")], }, }, ], r_curly_token: R_CURLY@67..69 "}" [] [Whitespace(" ")], }, }, ], r_curly_token: R_CURLY@69..70 "}" [] [], }, COMMA@70..72 "," [] [Whitespace(" ")], JsStringLiteralExpression { value_token: JS_STRING_LITERAL@72..77 "\"bar\"" [] [], }, ], r_paren_token: R_PAREN@77..78 ")" [] [], }, }, semicolon_token: missing (optional), }, ], eof_token: EOF@78..79 "" [Newline("\n")] [], } 0: JS_MODULE@0..79 0: (empty) 1: (empty) 2: JS_DIRECTIVE_LIST@0..0 3: JS_MODULE_ITEM_LIST@0..78 0: JS_EXPRESSION_STATEMENT@0..8 0: JS_IMPORT_CALL_EXPRESSION@0..8 0: IMPORT_KW@0..6 "import" [] [] 1: JS_CALL_ARGUMENTS@6..8 0: L_PAREN@6..7 "(" [] [] 1: JS_CALL_ARGUMENT_LIST@7..7 2: R_PAREN@7..8 ")" [] [] 1: (empty) 1: JS_EXPRESSION_STATEMENT@8..27 0: JS_BOGUS_EXPRESSION@8..27 0: IMPORT_KW@8..15 "import" [Newline("\n")] [] 1: JS_BOGUS@15..27 0: L_PAREN@15..16 "(" [] [] 1: JS_BOGUS@16..26 0: JS_BOGUS_MEMBER@16..26 0: DOT3@16..19 "..." [] [] 1: JS_ARRAY_EXPRESSION@19..26 0: L_BRACK@19..20 "[" [] [] 1: JS_ARRAY_ELEMENT_LIST@20..25 0: JS_STRING_LITERAL_EXPRESSION@20..25 0: JS_STRING_LITERAL@20..25 "\"foo\"" [] [] 2: R_BRACK@25..26 "]" [] [] 2: R_PAREN@26..27 ")" [] [] 1: (empty) 2: JS_EXPRESSION_STATEMENT@27..78 0: JS_IMPORT_CALL_EXPRESSION@27..78 0: IMPORT_KW@27..34 "import" [Newline("\n")] [] 1: JS_CALL_ARGUMENTS@34..78 0: L_PAREN@34..35 "(" [] [] 1: JS_CALL_ARGUMENT_LIST@35..77 0: JS_STRING_LITERAL_EXPRESSION@35..40 0: JS_STRING_LITERAL@35..40 "\"foo\"" [] [] 1: COMMA@40..42 "," [] [Whitespace(" ")] 2: JS_OBJECT_EXPRESSION@42..70 0: L_CURLY@42..44 "{" [] [Whitespace(" ")] 1: JS_OBJECT_MEMBER_LIST@44..69 0: JS_PROPERTY_OBJECT_MEMBER@44..69 0: JS_LITERAL_MEMBER_NAME@44..50 0: IDENT@44..50 "assert" [] [] 1: COLON@50..52 ":" [] [Whitespace(" ")] 2: JS_OBJECT_EXPRESSION@52..69 0: L_CURLY@52..54 "{" [] [Whitespace(" ")] 1: JS_OBJECT_MEMBER_LIST@54..67 0: JS_PROPERTY_OBJECT_MEMBER@54..67 0: JS_LITERAL_MEMBER_NAME@54..58 0: IDENT@54..58 "type" [] [] 1: COLON@58..60 ":" [] [Whitespace(" ")] 2: JS_STRING_LITERAL_EXPRESSION@60..67 0: JS_STRING_LITERAL@60..67 "'json'" [] [Whitespace(" ")] 2: R_CURLY@67..69 "}" [] [Whitespace(" ")] 2: R_CURLY@69..70 "}" [] [] 3: COMMA@70..72 "," [] [Whitespace(" ")] 4: JS_STRING_LITERAL_EXPRESSION@72..77 0: JS_STRING_LITERAL@72..77 "\"bar\"" [] [] 2: R_PAREN@77..78 ")" [] [] 1: (empty) 4: EOF@78..79 "" [Newline("\n")] [] -- import_invalid_args.js:1:8 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × `import()` requires exactly one or two arguments. > 1 │ import() │ ^ 2 │ import(...["foo"]) 3 │ import("foo", { assert: { type: 'json' } }, "bar") -- import_invalid_args.js:2:8 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × `...` is not allowed in `import()` 1 │ import() > 2 │ import(...["foo"]) │ ^^^^^^^^^^ 3 │ import("foo", { assert: { type: 'json' } }, "bar") 4 │ -- import_invalid_args.js:3:45 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × `import()` requires exactly one or two arguments. 1 │ import() 2 │ import(...["foo"]) > 3 │ import("foo", { assert: { type: 'json' } }, "bar") │ ^^^^^^ 4 │ -- import() import(...["foo"]) import("foo", { assert: { type: 'json' } }, "bar")