JsModule { bom_token: missing (optional), interpreter_token: missing (optional), directives: JsDirectiveList [], items: JsModuleItemList [ JsVariableStatement { declarations: JsVariableDeclarations { kind: LET_KW@0..4 "let" [] [Whitespace(" ")], items: JsVariableDeclarationList [ JsVariableDeclaration { id: JsIdentifierBinding { name_token: IDENT@4..6 "a" [] [Whitespace(" ")], }, excl_token: missing (optional), type_annotation: missing (optional), initializer: JsInitializerClause { eq_token: EQ@6..8 "=" [] [Whitespace(" ")], expression: JsImportCallExpression { import_token: IMPORT_KW@8..14 "import" [] [], l_paren_token: L_PAREN@14..15 "(" [] [], argument: missing (required), r_paren_token: R_PAREN@15..16 ")" [] [], }, }, }, ], }, semicolon_token: SEMICOLON@16..17 ";" [] [], }, JsExpressionStatement { expression: JsCallExpression { callee: JsIdentifierExpression { name: JsReferenceIdentifier { value_token: IDENT@17..21 "foo" [Newline("\n")] [], }, }, optional_chain_token_token: missing (optional), type_args: missing (optional), arguments: JsCallArguments { l_paren_token: L_PAREN@21..22 "(" [] [], args: JsCallArgumentList [], r_paren_token: R_PAREN@22..23 ")" [] [], }, }, semicolon_token: SEMICOLON@23..24 ";" [] [], }, ], eof_token: EOF@24..25 "" [Newline("\n")] [], } 0: JS_MODULE@0..25 0: (empty) 1: (empty) 2: JS_DIRECTIVE_LIST@0..0 3: JS_MODULE_ITEM_LIST@0..24 0: JS_VARIABLE_STATEMENT@0..17 0: JS_VARIABLE_DECLARATIONS@0..16 0: LET_KW@0..4 "let" [] [Whitespace(" ")] 1: JS_VARIABLE_DECLARATION_LIST@4..16 0: JS_VARIABLE_DECLARATION@4..16 0: JS_IDENTIFIER_BINDING@4..6 0: IDENT@4..6 "a" [] [Whitespace(" ")] 1: (empty) 2: (empty) 3: JS_INITIALIZER_CLAUSE@6..16 0: EQ@6..8 "=" [] [Whitespace(" ")] 1: JS_IMPORT_CALL_EXPRESSION@8..16 0: IMPORT_KW@8..14 "import" [] [] 1: L_PAREN@14..15 "(" [] [] 2: (empty) 3: R_PAREN@15..16 ")" [] [] 1: SEMICOLON@16..17 ";" [] [] 1: JS_EXPRESSION_STATEMENT@17..24 0: JS_CALL_EXPRESSION@17..23 0: JS_IDENTIFIER_EXPRESSION@17..21 0: JS_REFERENCE_IDENTIFIER@17..21 0: IDENT@17..21 "foo" [Newline("\n")] [] 1: (empty) 2: (empty) 3: JS_CALL_ARGUMENTS@21..23 0: L_PAREN@21..22 "(" [] [] 1: JS_CALL_ARGUMENT_LIST@22..22 2: R_PAREN@22..23 ")" [] [] 1: SEMICOLON@23..24 ";" [] [] 4: EOF@24..25 "" [Newline("\n")] [] -- error[SyntaxError]: expected an expression, or an assignment but instead found ')' ┌─ import_call_no_arg.js:1:16 │ 1 │ let a = import(); │ ^ Expected an expression, or an assignment here -- let a = import(); foo();