Files
oxc-project__oxc/tasks/coverage/snapshots/parser_babel.snap
camc314 1400a0f8be fix(parser): require a string source after export ... from (#26389)
Named exports must have a string literal module source once `from` is present. The parser previously combined consuming `from` with checking whether the next token was a literal:

```rust
if self.eat(Kind::From) && self.cur_kind().is_literal()
```

When the next token was not a literal, `from` had already been consumed, but parsing fell back to a local export. This incorrectly accepted `export {} from;`, `export {} from` at EOF, and this input:

```js
export {} from
foo();
```

In the last case, the newline allowed automatic semicolon insertion, so the parser accepted a local empty export followed by `foo()` despite the incomplete `from` clause.

Remove the literal-kind guard so consuming `from` always leads to `parse_literal_string()`. That helper already requires a string literal and handles malformed input through the existing parser diagnostics. A missing source now produces a syntax error instead of becoming a local export, while unterminated strings and comments retain the standard lexer diagnostics.

Valid local exports such as `export { foo };` and re-exports such as `export { foo } from "./module.js";` keep their existing behavior, including a module source placed on the next line.
2026-09-07 12:41:32 +00:00

15773 lines
611 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
commit: 1eac4481
parser_babel Summary:
AST Parsed : 2234/2234 (100.00%)
Positive Passed: 2218/2234 (99.28%)
Negative Passed: 1728/1742 (99.20%)
Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/cast/unparenthesized-assert-and-assign/input.ts
Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/cast/unparenthesized-type-assertion-and-assign/input.ts
Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/conditional/arrow-ambiguity/input.ts
Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/conditional/arrow-like/input.ts
Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/conditional/arrow-param/input.ts
Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/decorators/type-arguments-invalid/input.ts
Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/export/equals-in-script/input.ts
Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/export/invalid-as-namespace-duplicate-identifier/input.ts
Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/import/equals-in-script/input.ts
Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/import/equals-require-in-script/input.ts
Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/module-namespace/invalid-body-export-named/input.ts
Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/module-namespace/invalid-declare-module-identifier/input.ts
Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/module-namespace/invalid-global-redeclare-block-level-variable-in-module/input.ts
Expect Syntax Error: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/module-namespace/module-identifier-invalid/input.ts
Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/estree/class-private-method/typescript-invalid-abstract/input.ts
× TS(18019): 'abstract' modifier cannot be used with a private identifier.
╭─[babel/packages/babel-parser/test/fixtures/estree/class-private-method/typescript-invalid-abstract/input.ts:2:12]
1 │ abstract class TSAbstractClass {
2 │ abstract #foo(name: string): boolean;
· ────
3 │ }
╰────
Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/class/constructor-with-modifier-names/input.ts
× Multiple constructor implementations are not allowed.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/constructor-with-modifier-names/input.ts:2:3]
1 │ class Foo {
2 │ constructor(set, readonly) {}
· ─────┬─────
· ╰── constructor has already been declared here
3 │ constructor(set: any, readonly: boolean) {}
· ─────┬─────
· ╰── it cannot be redeclared here
4 │ }
╰────
Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/class/declare/input.ts
× Identifier `x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/declare/input.ts:3:5]
2 │ [x: string]: any;
3 │ x;
· ┬
· ╰── `x` has already been declared here
4 │ x: number;
· ┬
· ╰── It can not be redeclared here
5 │ f();
╰────
Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/class/members-with-modifier-names/input.ts
× TS(2391): Function implementation is missing or not immediately following the declaration.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/members-with-modifier-names/input.ts:2:5]
1 │ class C {
2 │ public(): void;
· ──────
3 │ public static(): void;
╰────
× TS(2391): Function implementation is missing or not immediately following the declaration.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/members-with-modifier-names/input.ts:3:12]
2 │ public(): void;
3 │ public static(): void;
· ──────
4 │ readonly = 0;
╰────
× TS(2391): Function implementation is missing or not immediately following the declaration.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/members-with-modifier-names/input.ts:5:5]
4 │ readonly = 0;
5 │ async<T>(): void;
· ─────
6 │ abstract!:void;
╰────
Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/class/members-with-reserved-names/input.ts
× TS(2391): Function implementation is missing or not immediately following the declaration.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/members-with-reserved-names/input.ts:2:12]
1 │ class C {
2 │ public delete(): void;
· ──────
3 │ }
╰────
Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/class/method-no-body/input.ts
× TS(2391): Function implementation is missing or not immediately following the declaration.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/method-no-body/input.ts:3:5]
2 │ f();
3 │ f(): void;
· ─
4 │ }
╰────
Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/class/method-with-newline-without-body/input.ts
× TS(2391): Function implementation is missing or not immediately following the declaration.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/method-with-newline-without-body/input.ts:3:5]
2 │ {
3 │ m()
· ─
4 │ n()
╰────
× TS(2391): Function implementation is missing or not immediately following the declaration.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/method-with-newline-without-body/input.ts:4:5]
3 │ m()
4 │ n()
· ─
5 │ }
╰────
Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/class/modifiers-override/input.ts
× Identifier `show` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/modifiers-override/input.ts:2:12]
1 │ class MyClass extends BaseClass {
2 │ override show() {}
· ──┬─
· ╰── `show` has already been declared here
3 │ public override show() {}
· ──┬─
· ╰── It can not be redeclared here
4 │ override size = 5;
╰────
× Identifier `size` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/modifiers-override/input.ts:4:12]
3 │ public override show() {}
4 │ override size = 5;
· ──┬─
· ╰── `size` has already been declared here
5 │ override readonly size = 5;
· ──┬─
· ╰── It can not be redeclared here
6 │
╰────
Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/class/parameter-properties/input.ts
× TS(1016): A required parameter cannot follow an optional parameter.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/parameter-properties/input.ts:7:9]
6 │ private pi?: number,
7 │ public readonly pur,
· ───────────────────
8 │ // Also works on AssignmentPattern
╰────
× TS(1015): A parameter cannot have a question mark and an initializer.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/parameter-properties/input.ts:10:16]
9 │ readonly x = 0,
10 │ public y?: number = 0) {}
· ─
11 │ }
╰────
Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/class/properties/input.ts
× Identifier `x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/properties/input.ts:2:5]
1 │ class C {
2 │ x;
· ┬
· ╰── `x` has already been declared here
3 │ x?;
· ┬
· ╰── It can not be redeclared here
4 │ x: number;
╰────
× Identifier `x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/properties/input.ts:3:5]
2 │ x;
3 │ x?;
· ┬
· ╰── `x` has already been declared here
4 │ x: number;
· ┬
· ╰── It can not be redeclared here
5 │ x: number = 1;
╰────
× Identifier `x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/properties/input.ts:4:5]
3 │ x?;
4 │ x: number;
· ┬
· ╰── `x` has already been declared here
5 │ x: number = 1;
· ┬
· ╰── It can not be redeclared here
6 │ x!: number;
╰────
× Identifier `x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/properties/input.ts:5:5]
4 │ x: number;
5 │ x: number = 1;
· ┬
· ╰── `x` has already been declared here
6 │ x!: number;
· ┬
· ╰── It can not be redeclared here
7 │ }
╰────
Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/class/static/input.ts
× TS(2391): Function implementation is missing or not immediately following the declaration.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/static/input.ts:5:20]
4 │ protected static f();
5 │ private static f();
· ─
6 │ }
╰────
Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/function/declare-pattern-parameters/input.ts
× TS(1016): A required parameter cannot follow an optional parameter.
╭─[babel/packages/babel-parser/test/fixtures/typescript/function/declare-pattern-parameters/input.ts:1:25]
1 │ declare function f([]?, {})
· ──
╰────
Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/module-namespace/head/input.ts
× TS(1035): Only ambient modules can use quoted names.
╭─[babel/packages/babel-parser/test/fixtures/typescript/module-namespace/head/input.ts:3:8]
2 │ namespace M.N.O {}
3 │ module "m" {}
· ───
4 │ module 'n' {}
╰────
× TS(1035): Only ambient modules can use quoted names.
╭─[babel/packages/babel-parser/test/fixtures/typescript/module-namespace/head/input.ts:4:8]
3 │ module "m" {}
4 │ module 'n' {}
· ───
╰────
Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/scope/redeclaration-in-nested-module/input.ts
× TS(2435): Ambient modules cannot be nested in other modules or namespaces.
╭─[babel/packages/babel-parser/test/fixtures/typescript/scope/redeclaration-in-nested-module/input.ts:3:3]
2 │ import type { JSONSchema7 } from 'json-schema';
3 │ ╭─▶ module 'test/sub2' {
4 │ │ export { JSONSchema7 }
5 │ ╰─▶ }
6 │ }
╰────
Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/types/const-type-parameters/input.ts
× TS(1277): 'const' modifier can only appear on a type parameter of a function, method or class
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/const-type-parameters/input.ts:22:13]
21 │
22 │ interface I<const T> {}
· ───────
23 │ interface J<const T extends U> {}
╰────
× TS(1277): 'const' modifier can only appear on a type parameter of a function, method or class
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/const-type-parameters/input.ts:23:13]
22 │ interface I<const T> {}
23 │ interface J<const T extends U> {}
· ─────────────────
24 │ interface K<T, const U> {}
╰────
× TS(1277): 'const' modifier can only appear on a type parameter of a function, method or class
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/const-type-parameters/input.ts:24:16]
23 │ interface J<const T extends U> {}
24 │ interface K<T, const U> {}
· ───────
25 │ interface L<in const T> {}
╰────
× TS(1277): 'const' modifier can only appear on a type parameter of a function, method or class
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/const-type-parameters/input.ts:25:13]
24 │ interface K<T, const U> {}
25 │ interface L<in const T> {}
· ──────────
26 │ interface M<const in T> {}
╰────
× TS(1277): 'const' modifier can only appear on a type parameter of a function, method or class
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/const-type-parameters/input.ts:26:13]
25 │ interface L<in const T> {}
26 │ interface M<const in T> {}
· ──────────
27 │
╰────
× Identifier `method` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/const-type-parameters/input.ts:29:3]
28 │ class _ {
29 │ method<const T>() {}
· ───┬──
· ╰── `method` has already been declared here
30 │ method<const T extends U>() {}
· ───┬──
· ╰── It can not be redeclared here
31 │ method<T, const U>() {}
╰────
× Identifier `method` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/const-type-parameters/input.ts:30:3]
29 │ method<const T>() {}
30 │ method<const T extends U>() {}
· ───┬──
· ╰── `method` has already been declared here
31 │ method<T, const U>() {}
· ───┬──
· ╰── It can not be redeclared here
32 │ }
╰────
Expect to Parse: tasks/coverage/babel/packages/babel-parser/test/fixtures/typescript/types/literal-string-4/input.ts
× TS(1338): 'infer' declarations are only permitted in the 'extends' clause of a conditional type.
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/literal-string-4/input.ts:1:15]
1 │ let x: `foo-${infer bar}`;
· ─────────
╰────
× Invalid function declaration
╭─[babel/packages/babel-parser/test/fixtures/annex-b/enabled/3.1-sloppy-labeled-functions-if-body/input.js:1:11]
1 │ if (0) x: function f() {}
· ───────────────
╰────
help: In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement
× Identifier `f` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/annex-b/enabled/3.4-var-redeclaration-catch-binding/input.js:2:17]
1 │ try {} catch (e) { var e; }
2 │ try {} catch ({ f }) { var f; }
· ┬ ┬
· │ ╰── It can not be redeclared here
· ╰── `f` has already been declared here
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/annex-b/enabled/invalid-assignment-target-type/input.js:3:2]
2 │
3 │ [async()] = [];
· ───────
4 │ ({ a: async() } = {});
╰────
× Expected `;` but found `Identifier`
╭─[babel/packages/babel-parser/test/fixtures/core/categorized/for-missing-semicolons/input.js:3:3]
2 │ var a = 1
3 │ a < 3
· ┬
· ╰── `;` expected
4 │ a++
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/core/categorized/invalid-assignment-pattern-1/input.js:1:2]
1 │ (a = 1) = t
· ─────
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/core/categorized/invalid-assignment-pattern-2/input.js:1:3]
1 │ [(a = 1)] = t
· ─────
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/core/categorized/invalid-assignment-pattern-3/input.js:1:2]
1 │ [({ a: [b = 2]})] = t
· ───────────────
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/core/categorized/invalid-assignment-pattern-4/input.js:1:7]
1 │ [{b: [([a = 1])]}] = t
· ─────────
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/core/categorized/invalid-assignment-pattern-5/input.js:1:2]
1 │ [([x])] = t;
· ─────
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/core/categorized/invalid-assignment-pattern-6/input.js:1:2]
1 │ (a += 1) = t
· ──────
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/core/categorized/invalid-assignment-pattern-7/input.js:1:2]
1 │ (a -= 1) = t
· ──────
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/core/categorized/invalid-assignment-pattern-8/input.js:1:2]
1 │ (b = (a -= 1)) = t
· ────────────
╰────
× Invalid function declaration
╭─[babel/packages/babel-parser/test/fixtures/core/categorized/invalid-fn-decl-inside-loop/input.js:1:11]
1 │ while (1) function foo(){}
· ────────────────
╰────
help: In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement
× Invalid function declaration
╭─[babel/packages/babel-parser/test/fixtures/core/categorized/invalid-fn-decl-labeled-inside-if/input.js:1:18]
1 │ if (1) foo: bar: function foo(){}
· ────────────────
╰────
help: In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement
× Invalid function declaration
╭─[babel/packages/babel-parser/test/fixtures/core/categorized/invalid-fn-decl-labeled-inside-loop/input.js:1:21]
1 │ while (1) foo: bar: function foo(){}
· ────────────────
╰────
help: In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/core/categorized/invalid-left-hand-side-in-postfix-operation/input.js:1:1]
1 │ a++ = t
· ───
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/core/categorized/invalid-left-hand-side-in-prefix-operation/input.js:1:1]
1 │ ++a = t
· ───
╰────
× Expected switch clause
╭─[babel/packages/babel-parser/test/fixtures/core/categorized/malformed-switch/input.js:2:3]
1 │ switch (x) {
2 │ var y = 5;
· ─┬─
· ╰── `case` or `default` clause expected here
3 │ }
╰────
help: If this is intended to be the condition for the switch statement, add `case` before it.
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/core/create-parenthesized-expressions/invalid-parenthesized-assignment-pattern/input.js:1:1]
1 │ ({x}) = {x: 1};
· ─────
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/core/create-parenthesized-expressions/invalid-parenthesized-assignment-pattern-2/input.js:1:7]
1 │ [{b: [([a = 1])]}] = t
· ─────────
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/core/create-parenthesized-expressions/invalid-parenthesized-assignment-pattern-3/input.js:1:2]
1 │ [({ a: [b = 2]})] = t
· ───────────────
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/core/create-parenthesized-expressions/invalid-parenthesized-assignment-pattern-4/input.js:1:3]
1 │ [(a = 1)] = t
· ─────
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/core/create-parenthesized-expressions/invalid-parenthesized-assignment-pattern-5/input.js:1:2]
1 │ (a = 1) = t
· ─────
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/core/create-parenthesized-expressions/invalid-parenthesized-assignment-pattern-6/input.js:1:1]
1 │ ([a]) = []
· ─────
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/core/create-parenthesized-expressions/invalid-parenthesized-left-hand-side/input.js:1:2]
1 │ (!a) += 1
· ──
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/core/create-parenthesized-expressions/invalid-pattern-in-rest-binding/input.js:1:11]
1 │ ([...(a)]) => {}
· ▲
╰────
help: Try inserting a semicolon here
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/core/create-parenthesized-expressions/valid-parenthesized-assignment-array-pattern-3/input.js:1:2]
1 │ [([x])] = t;
· ─────
╰────
× Expected `:` but found `}`
╭─[babel/packages/babel-parser/test/fixtures/core/escape-keyword/invalid/input.js:3:1]
2 │ br\u{65}ak
3 │ };
· ┬
· ╰── `:` expected
╰────
× '0'-prefixed octal literals and octal escape sequences are deprecated
╭─[babel/packages/babel-parser/test/fixtures/core/escape-string/invalid-decimal-escape-strict-directive/input.js:1:1]
1 │ "\01 foo \02 bar \03";
· ─────────────────────
2 │
╰────
help: for octal literals use the '0o' prefix instead
× '0'-prefixed octal literals and octal escape sequences are deprecated
╭─[babel/packages/babel-parser/test/fixtures/core/escape-string/invalid-decimal-escape-strict-directive/input.js:3:1]
2 │
3 │ "\4";
· ────
4 │ "\5";
╰────
help: for octal literals use the '0o' prefix instead
× '0'-prefixed octal literals and octal escape sequences are deprecated
╭─[babel/packages/babel-parser/test/fixtures/core/escape-string/invalid-decimal-escape-strict-directive/input.js:4:1]
3 │ "\4";
4 │ "\5";
· ────
5 │
╰────
help: for octal literals use the '0o' prefix instead
× '0'-prefixed octal literals and octal escape sequences are deprecated
╭─[babel/packages/babel-parser/test/fixtures/core/escape-string/invalid-decimal-escape-strict-directive/input.js:8:1]
7 │
8 │ "\4";
· ────
9 │ "\5";
╰────
help: for octal literals use the '0o' prefix instead
× '0'-prefixed octal literals and octal escape sequences are deprecated
╭─[babel/packages/babel-parser/test/fixtures/core/escape-string/invalid-decimal-escape-strict-directive/input.js:9:1]
8 │ "\4";
9 │ "\5";
· ────
10 │
╰────
help: for octal literals use the '0o' prefix instead
× '0'-prefixed octal literals and octal escape sequences are deprecated
╭─[babel/packages/babel-parser/test/fixtures/core/escape-string/invalid-decimal-escape-strict-directive/input.js:11:1]
10 │
11 │ "\04 foo \05 bar \06";
· ─────────────────────
╰────
help: for octal literals use the '0o' prefix instead
× '0'-prefixed octal literals and octal escape sequences are deprecated
╭─[babel/packages/babel-parser/test/fixtures/core/escape-string/invalid-decimal-escape-strict-directive-function/input.js:2:3]
1 │ function a() {
2 │ "\5";
· ────
3 │ "use strict";
╰────
help: for octal literals use the '0o' prefix instead
× '0'-prefixed octal literals and octal escape sequences are deprecated
╭─[babel/packages/babel-parser/test/fixtures/core/escape-string/invalid-decimal-escape-strict-directive-function/input.js:7:3]
6 │ function b() {
7 │ "\4";
· ────
8 │ "\5";
╰────
help: for octal literals use the '0o' prefix instead
× '0'-prefixed octal literals and octal escape sequences are deprecated
╭─[babel/packages/babel-parser/test/fixtures/core/escape-string/invalid-decimal-escape-strict-directive-function/input.js:8:3]
7 │ "\4";
8 │ "\5";
· ────
9 │ "use strict";
╰────
help: for octal literals use the '0o' prefix instead
× '0'-prefixed octal literals and octal escape sequences are deprecated
╭─[babel/packages/babel-parser/test/fixtures/core/escape-string/invalid-decimal-escape-strict-directive-function/input.js:14:3]
13 │ "use strict";
14 │ "\5";
· ────
15 │ }
╰────
help: for octal literals use the '0o' prefix instead
× '0'-prefixed octal literals and octal escape sequences are deprecated
╭─[babel/packages/babel-parser/test/fixtures/core/escape-string/invalid-decimal-escape-strict-directive-function/input.js:19:3]
18 │ "use strict";
19 │ "\4";
· ────
20 │ "\5";
╰────
help: for octal literals use the '0o' prefix instead
× '0'-prefixed octal literals and octal escape sequences are deprecated
╭─[babel/packages/babel-parser/test/fixtures/core/escape-string/invalid-decimal-escape-strict-directive-function/input.js:20:3]
19 │ "\4";
20 │ "\5";
· ────
21 │ }
╰────
help: for octal literals use the '0o' prefix instead
× Invalid escape sequence
╭─[babel/packages/babel-parser/test/fixtures/core/escape-string/non-octal-eight-and-nine/input.js:4:3]
3 │ "use strict";
4 │ "\8";"\9";
· ────
5 │ }
╰────
help: \8 and \9 are not allowed in strict mode
× Invalid escape sequence
╭─[babel/packages/babel-parser/test/fixtures/core/escape-string/non-octal-eight-and-nine/input.js:4:8]
3 │ "use strict";
4 │ "\8";"\9";
· ────
5 │ }
╰────
help: \8 and \9 are not allowed in strict mode
× Invalid escape sequence
╭─[babel/packages/babel-parser/test/fixtures/core/escape-string/non-octal-eight-and-nine-before-use-strict/input.js:2:3]
1 │ () => {
2 │ "\8";"\9";
· ────
3 │ "use strict";
╰────
help: \8 and \9 are not allowed in strict mode
× Invalid escape sequence
╭─[babel/packages/babel-parser/test/fixtures/core/escape-string/non-octal-eight-and-nine-before-use-strict/input.js:2:8]
1 │ () => {
2 │ "\8";"\9";
· ────
3 │ "use strict";
╰────
help: \8 and \9 are not allowed in strict mode
× Invalid escape sequence
╭─[babel/packages/babel-parser/test/fixtures/core/escape-string/non-octal-eight-and-nine-before-use-strict/input.js:4:3]
3 │ "use strict";
4 │ "\8";"\9";
· ────
5 │ }
╰────
help: \8 and \9 are not allowed in strict mode
× Invalid escape sequence
╭─[babel/packages/babel-parser/test/fixtures/core/escape-string/non-octal-eight-and-nine-before-use-strict/input.js:4:8]
3 │ "use strict";
4 │ "\8";"\9";
· ────
5 │ }
╰────
help: \8 and \9 are not allowed in strict mode
× '0'-prefixed octal literals and octal escape sequences are deprecated
╭─[babel/packages/babel-parser/test/fixtures/core/escape-string/numeric-escape-in-directive/input.js:1:53]
1 │ function hello() { "use strict"; function inner() { "octal directive\1"; } }
· ───────────────────
╰────
help: for octal literals use the '0o' prefix instead
× '0'-prefixed octal literals and octal escape sequences are deprecated
╭─[babel/packages/babel-parser/test/fixtures/core/escape-string/numeric-escape-in-property-name/input.js:1:37]
1 │ function hello() { 'use strict'; ({ "\1": 42 }); }
· ────
╰────
help: for octal literals use the '0o' prefix instead
× Bad escape sequence in untagged template literal
╭─[babel/packages/babel-parser/test/fixtures/core/escape-template/non-octal-eight/input.js:1:2]
1 │ `\8`;
· ──
╰────
× Bad escape sequence in untagged template literal
╭─[babel/packages/babel-parser/test/fixtures/core/escape-template/non-octal-nine/input.js:1:2]
1 │ `\9`;
· ──
╰────
× '0'-prefixed octal literals and octal escape sequences are deprecated
╭─[babel/packages/babel-parser/test/fixtures/core/legacy-octal/legacy-octal-after-use-strict/input.js:1:15]
1 │ "use strict"; 04; 05;
· ──
╰────
help: for octal literals use the '0o' prefix instead
× '0'-prefixed octal literals and octal escape sequences are deprecated
╭─[babel/packages/babel-parser/test/fixtures/core/legacy-octal/legacy-octal-after-use-strict/input.js:1:19]
1 │ "use strict"; 04; 05;
· ──
╰────
help: for octal literals use the '0o' prefix instead
× '0'-prefixed octal literals and octal escape sequences are deprecated
╭─[babel/packages/babel-parser/test/fixtures/core/legacy-octal/legacy-octal-after-use-strict-function/input.js:3:3]
2 │ "use strict";
3 │ 05;
· ──
4 │ }
╰────
help: for octal literals use the '0o' prefix instead
× '0'-prefixed octal literals and octal escape sequences are deprecated
╭─[babel/packages/babel-parser/test/fixtures/core/legacy-octal/legacy-octal-after-use-strict-function/input.js:8:3]
7 │ "use strict";
8 │ 04;
· ──
9 │ 05;
╰────
help: for octal literals use the '0o' prefix instead
× '0'-prefixed octal literals and octal escape sequences are deprecated
╭─[babel/packages/babel-parser/test/fixtures/core/legacy-octal/legacy-octal-after-use-strict-function/input.js:9:3]
8 │ 04;
9 │ 05;
· ──
10 │ }
╰────
help: for octal literals use the '0o' prefix instead
× Keywords cannot contain escape characters
╭─[babel/packages/babel-parser/test/fixtures/core/object/invalid-escape-get/input.js:1:4]
1 │ ({ ge\u0074 x() {} })
· ────────
╰────
× A 'get' accessor must not have any formal parameters.
╭─[babel/packages/babel-parser/test/fixtures/core/object/invalid-getter-param/input.js:1:12]
1 │ ({ get prop(x) {} })
· ───
╰────
help: Remove these parameters here
× TS(1049): A 'set' accessor must have exactly one parameter.
╭─[babel/packages/babel-parser/test/fixtures/core/object/invalid-setter-no-param/input.js:1:9]
1 │ ({ set x(){} })
· ──
╰────
help: Add a parameter here
× TS(1049): A 'set' accessor must have exactly one parameter.
╭─[babel/packages/babel-parser/test/fixtures/core/object/invalid-setter-two-params/input.js:1:12]
1 │ ({ set prop(x, y) {} })
· ──────
╰────
help: Remove parameters except the first one here
× `for await` loops are only allowed within async functions and at the top levels of modules
╭─[babel/packages/babel-parser/test/fixtures/core/opts/allowAwaitOutsideFunction-false/input.js:1:5]
1 │ for await (const i of imports) {}
· ─────
╰────
help: Either remove this `await` or add the `async` keyword to the enclosing function
× Unexpected new.target expression
╭─[babel/packages/babel-parser/test/fixtures/core/opts/allowNewTargetOutsideFunction-false/input.js:1:11]
1 │ const x = new.target;
· ──────────
╰────
help: new.target is only allowed in constructors, functions, and class field initializers
× Unexpected new.target expression
╭─[babel/packages/babel-parser/test/fixtures/core/opts/allowNewTargetOutsideFunction-false-2/input.js:1:17]
1 │ const y = () => new.target;
· ──────────
╰────
help: new.target is only allowed in constructors, functions, and class field initializers
× TS(18041): A 'return' statement cannot be used inside a class static block.
╭─[babel/packages/babel-parser/test/fixtures/core/opts/allowReturnOutsideFunction-true-invalid-in-static-block/input.js:3:5]
2 │ static {
3 │ return 0;
· ──────
4 │ }
╰────
× A 'yield' expression is only allowed in a generator body.
╭─[babel/packages/babel-parser/test/fixtures/core/opts/allowYieldOutsideFunction-false/input.js:1:1]
1 │ yield 1;
· ─────
╰────
help: Either remove this `yield` or change the enclosing function to a generator function (`function*`)
× A 'yield' expression is only allowed in a generator body.
╭─[babel/packages/babel-parser/test/fixtures/core/opts/allowYieldOutsideFunction-true/input.js:1:1]
1 │ yield 1;
· ─────
2 │
╰────
help: Either remove this `yield` or change the enclosing function to a generator function (`function*`)
× A 'yield' expression is only allowed in a generator body.
╭─[babel/packages/babel-parser/test/fixtures/core/opts/allowYieldOutsideFunction-true/input.js:4:3]
3 │ function fn() {
4 │ yield 1;
· ─────
5 │ }
╰────
help: Either remove this `yield` or change the enclosing function to a generator function (`function*`)
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/core/regression/13694-invalid-dot-bracketL-member/input.js:1:3]
1 │ a.[b]
· ─
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/core/regression/T2921/input.js:1:5]
1 │ a <== b;
· ─
╰────
× Decimals with leading zeros are not allowed in strict mode
╭─[babel/packages/babel-parser/test/fixtures/core/regression/non-octal-float-strict-mode/input.js:1:1]
1 │ 09.5
· ────
╰────
help: remove the leading zero
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/core/regression/octal-float-fail/input.js:1:3]
1 │ 07.5
· ▲
╰────
help: Try inserting a semicolon here
× Identifier `foo` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/core/scope/dupl-bind-2nd-lvl-lex/input.js:2:5]
1 │ let bar;
2 │ var foo = 1;
· ─┬─
· ╰── `foo` has already been declared here
3 │ let foo = 1;
· ─┬─
· ╰── It can not be redeclared here
╰────
× Identifier `foo` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/core/scope/dupl-bind-2nd-lvl-lex-nested/input.js:3:7]
2 │ let bar;
3 │ var foo = 1;
· ─┬─
· ╰── `foo` has already been declared here
4 │ let foo = 1;
· ─┬─
· ╰── It can not be redeclared here
5 │ }
╰────
× Identifier `foo` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/core/scope/dupl-bind-2nd-lvl-var/input.js:2:5]
1 │ let bar;
2 │ let foo = 1;
· ─┬─
· ╰── `foo` has already been declared here
3 │ var foo = 1;
· ─┬─
· ╰── It can not be redeclared here
╰────
× Identifier `foo` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/core/scope/dupl-bind-2nd-lvl-var-nested/input.js:3:7]
2 │ let bar;
3 │ let foo = 1;
· ─┬─
· ╰── `foo` has already been declared here
4 │ var foo = 1;
· ─┬─
· ╰── It can not be redeclared here
5 │ }
╰────
× Identifier `foo` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-arr-destr/input.js:2:11]
1 │ try {
2 │ } catch ([foo, foo]) {
· ─┬─ ─┬─
· │ ╰── It can not be redeclared here
· ╰── `foo` has already been declared here
3 │ }
╰────
× Identifier `foo` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-dbl-let/input.js:1:5]
1 │ let foo; try {} catch (foo) {} let foo;
· ─┬─ ─┬─
· │ ╰── It can not be redeclared here
· ╰── `foo` has already been declared here
╰────
× Identifier `foo` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-func/input.js:2:10]
1 │ try {
2 │ } catch (foo) {
· ─┬─
· ╰── `foo` has already been declared here
3 │ function foo() {}
· ─┬─
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `foo` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-let/input.js:2:10]
1 │ try {
2 │ } catch (foo) {
· ─┬─
· ╰── `foo` has already been declared here
3 │ let foo;
· ─┬─
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `foo` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-obj-destr/input.js:2:15]
1 │ try {
2 │ } catch ({ a: foo, b: { c: [foo] } }) {
· ─┬─ ─┬─
· │ ╰── It can not be redeclared here
· ╰── `foo` has already been declared here
3 │ }
╰────
× Identifier `foo` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-var-arr-destr/input.js:2:11]
1 │ try {
2 │ } catch ([foo]) {
· ─┬─
· ╰── `foo` has already been declared here
3 │ var foo;
· ─┬─
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `foo` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-var-obj-destr/input.js:2:12]
1 │ try {
2 │ } catch ({ foo }) {
· ─┬─
· ╰── `foo` has already been declared here
3 │ var foo;
· ─┬─
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `foo` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-class/input.js:1:7]
1 │ class foo {};
· ─┬─
· ╰── `foo` has already been declared here
2 │ class foo {};
· ─┬─
· ╰── It can not be redeclared here
╰────
× Identifier `foo` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-const/input.js:1:7]
1 │ class foo {};
· ─┬─
· ╰── `foo` has already been declared here
2 │ const foo = 1;
· ─┬─
· ╰── It can not be redeclared here
╰────
× Identifier `foo` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-func/input.js:1:7]
1 │ class foo {};
· ─┬─
· ╰── `foo` has already been declared here
2 │ function foo () {};
· ─┬─
· ╰── It can not be redeclared here
╰────
× Identifier `foo` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-let/input.js:1:7]
1 │ class foo {};
· ─┬─
· ╰── `foo` has already been declared here
2 │ let foo = 1;
· ─┬─
· ╰── It can not be redeclared here
╰────
× Identifier `foo` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-var/input.js:1:7]
1 │ class foo {};
· ─┬─
· ╰── `foo` has already been declared here
2 │ var foo;
· ─┬─
· ╰── It can not be redeclared here
╰────
× Identifier `foo` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/core/scope/dupl-bind-const-const/input.js:1:7]
1 │ const foo=1, foo=2;
· ─┬─ ─┬─
· │ ╰── It can not be redeclared here
· ╰── `foo` has already been declared here
╰────
× Identifier `f` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-gen/input.js:1:12]
1 │ { function f() {} function* f() {} }
· ┬ ┬
· │ ╰── It can not be redeclared here
· ╰── `f` has already been declared here
╰────
× Identifier `foo` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-module/input.js:1:10]
1 │ function foo() {}
· ─┬─
· ╰── `foo` has already been declared here
2 │ function foo() {}
· ─┬─
· ╰── It can not be redeclared here
╰────
× Identifier `foo` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-module-sloppy/input.js:1:12]
1 │ { function foo() {} function foo() {} }
· ─┬─ ─┬─
· │ ╰── It can not be redeclared here
· ╰── `foo` has already been declared here
╰────
× Identifier `foo` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-var-sloppy/input.js:2:12]
1 │ {
2 │ function foo() {}
· ─┬─
· ╰── `foo` has already been declared here
3 │ var foo = 1;
· ───┬───
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `f` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/core/scope/dupl-bind-gen-func/input.js:1:13]
1 │ { function* f() {} function f() {} }
· ┬ ┬
· │ ╰── It can not be redeclared here
· ╰── `f` has already been declared here
╰────
× Identifier `foo` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/core/scope/dupl-bind-let-let/input.js:1:5]
1 │ let foo, foo;
· ─┬─ ─┬─
· │ ╰── It can not be redeclared here
· ╰── `foo` has already been declared here
╰────
× Identifier `a` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/core/scope/dupl-bind-nested-let-var/input.js:2:7]
1 │ {
2 │ let a;
· ┬
· ╰── `a` has already been declared here
3 │ { var a; }
· ┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `i` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/core/scope/for-var/input.js:1:10]
1 │ for (let i = 0;;) {
· ┬
· ╰── `i` has already been declared here
2 │ var i;
· ┬
· ╰── It can not be redeclared here
3 │ }
╰────
× Export 'encrypt' is not defined
╭─[babel/packages/babel-parser/test/fixtures/core/scope/undecl-export/input.js:1:10]
1 │ export { encrypt };
· ───────
╰────
× Export 'encrypt' is not defined
╭─[babel/packages/babel-parser/test/fixtures/core/scope/undecl-export-as/input.js:1:10]
1 │ export { encrypt as decrypt };
· ───────
2 │ function decrypt() {}
╰────
help: Did you mean 'decrypt'?
× Export 'encrypt' is not defined
╭─[babel/packages/babel-parser/test/fixtures/core/scope/undecl-export-as-default/input.js:1:10]
1 │ export { encrypt as default };
· ───────
╰────
× Export 'encrypt' is not defined
╭─[babel/packages/babel-parser/test/fixtures/core/scope/undecl-export-block/input.js:4:10]
3 │ }
4 │ export { encrypt }
· ───────
╰────
× Export 'Object' is not defined
╭─[babel/packages/babel-parser/test/fixtures/core/scope/undecl-export-builtin/input.js:1:10]
1 │ export { Object };
· ──────
╰────
× Export 'Object' is not defined
╭─[babel/packages/babel-parser/test/fixtures/core/scope/undecl-export-builtin-as/input.js:1:10]
1 │ export { Object as Obj };
· ──────
╰────
× Invalid function declaration
╭─[babel/packages/babel-parser/test/fixtures/core/scope/undecl-export-if/input.js:2:11]
1 │ export { encrypt };
2 │ if (true) function encrypt() {}
· ─────────────────────
╰────
help: In strict mode code, functions can only be declared at top level or inside a block
× `await` is only allowed within async functions and at the top levels of modules
╭─[babel/packages/babel-parser/test/fixtures/core/sourcetype-commonjs/invalid-top-level-await/input.js:1:1]
1 │ await Promise.resolve();
· ─────
╰────
help: Either remove this `await` or add the `async` keyword to the enclosing function
× A 'yield' expression is only allowed in a generator body.
╭─[babel/packages/babel-parser/test/fixtures/core/sourcetype-commonjs/invalid-top-level-yield/input.js:1:1]
1 │ yield 0;
· ─────
╰────
help: Either remove this `yield` or change the enclosing function to a generator function (`function*`)
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/108/input.js:1:17]
1 │ var x = /[P QR]/\u0067
· ▲
╰────
help: Try inserting a semicolon here
× Expected `}` but found `EOF`
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/345/input.js:1:2]
1 │ {
· ┬
· ╰── Opened here
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/346/input.js:1:1]
1 │ }
· ─
╰────
× Invalid Character `a`
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/347/input.js:1:3]
1 │ 3ea
· ▲
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/347/input.js:1:3]
1 │ 3ea
· ─
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/348/input.js:1:2]
1 │ 3in []
· ──
╰────
× Unexpected end of file
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/349/input.js:1:3]
1 │ 3e
╰────
× Unexpected end of file
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/350/input.js:1:4]
1 │ 3e+
╰────
× Unexpected end of file
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/351/input.js:1:4]
1 │ 3e-
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/352/input.js:1:2]
1 │ 3x
· ─
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/353/input.js:1:2]
1 │ 3x0
· ─
╰────
× Unexpected end of file
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/354/input.js:1:3]
1 │ 0x
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/357/input.js:1:3]
1 │ 01a
· ─
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/358/input.js:1:2]
1 │ 3in[]
· ──
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/359/input.js:1:4]
1 │ 0x3in[]
· ──
╰────
× Unterminated string
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/360/input.js:1:1]
1 │ "Hello
· ───────
2 │ World"
╰────
× Invalid Character `\`
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/362/input.js:1:8]
1 │ x\u005c
╰────
× Invalid Character `*`
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/363/input.js:1:8]
1 │ x\u002a
╰────
× Unterminated regular expression
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/364/input.js:1:1]
1 │ /
· ─
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/364/input.js:1:1]
1 │ /
· ─
╰────
× Unterminated regular expression
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/365/input.js:1:1]
1 │ /test
· ─────
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/365/input.js:1:1]
1 │ /test
· ─────
╰────
× Invalid Unicode escape sequence
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/366/input.js:1:17]
1 │ var x = /[a-z]/\ux
· ─
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/366/input.js:1:16]
1 │ var x = /[a-z]/\ux
· ▲
╰────
help: Try inserting a semicolon here
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/367/input.js:1:1]
1 │ 3 = 4
· ─
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/368/input.js:1:1]
1 │ func() = 4
· ──────
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/369/input.js:1:2]
1 │ (1 + 1) = 10
· ─────
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/370/input.js:1:1]
1 │ 1++
· ─
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/371/input.js:1:1]
1 │ 1--
· ─
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/372/input.js:1:3]
1 │ ++1
· ─
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/373/input.js:1:3]
1 │ --1
· ─
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/374/input.js:1:6]
1 │ for((1 + 1) in list) process(x);
· ─────
╰────
× Expected `]` but found `EOF`
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/375/input.js:1:2]
1 │ [
╰────
× Expected `]` but found `EOF`
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/376/input.js:1:3]
1 │ [,
╰────
× Expected `}` but found `EOF`
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/377/input.js:1:6]
1 │ 1 + {
╰────
× Expected `}` but found `EOF`
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/378/input.js:2:1]
1 │ 1 + { t:t
╰────
× Expected `}` but found `EOF`
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/379/input.js:1:11]
1 │ 1 + { t:t,
╰────
× Unterminated regular expression
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/380/input.js:1:9]
1 │ var x = /
· ──
2 │ /
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/380/input.js:1:9]
1 │ ╭─▶ var x = /
2 │ ╰─▶ /
╰────
× Unterminated string
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/381/input.js:1:9]
1 │ var x = "
· ──
╰────
× Identifier expected. 'if' is a reserved word that cannot be used here.
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/382/input.js:1:5]
1 │ var if = 42
· ──
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/383/input.js:1:1]
1 │ i + 2 = 42
· ─────
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/384/input.js:1:1]
1 │ +i = 42
· ──
╰────
× Expected `)` but found `EOF`
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/385/input.js:1:6]
1 │ 1 + (
╰────
× Expected `}` but found `EOF`
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/386/input.js:4:2]
3 │
4 │ {
· ┬
· ╰── Opened here
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/387/input.js:4:1]
3 │ comment */
4 │ )
· ─
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/388/input.js:1:6]
1 │ { set 1 }
· ▲
╰────
help: Try inserting a semicolon here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/389/input.js:1:6]
1 │ { get 2 }
· ▲
╰────
help: Try inserting a semicolon here
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/390/input.js:1:11]
1 │ ({ set: s(if) { } })
· ──
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/391/input.js:1:10]
1 │ ({ set s(.) { } })
· ─
╰────
× Expected `,` or `}` but found `{`
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/392/input.js:1:13]
1 │ ({ set: s() { } })
· ┬ ┬
· │ ╰── `,` or `}` expected
· ╰── Opened here
╰────
× Expected `,` or `}` but found `{`
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/393/input.js:1:17]
1 │ ({ set: s(a, b) { } })
· ┬ ┬
· │ ╰── `,` or `}` expected
· ╰── Opened here
╰────
× Expected `,` or `}` but found `{`
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/394/input.js:1:14]
1 │ ({ get: g(d) { } })
· ┬ ┬
· │ ╰── `,` or `}` expected
· ╰── Opened here
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/395/input.js:1:15]
1 │ function t(...) { }
· ─
╰────
× A rest parameter must be last in a parameter list
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/396/input.js:1:12]
1 │ function t(...rest, b) { }
· ───────
╰────
× Identifier expected. 'if' is a reserved word that cannot be used here.
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/397/input.js:1:12]
1 │ function t(if) { }
· ──
╰────
× Identifier expected. 'true' is a reserved word that cannot be used here.
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/398/input.js:1:12]
1 │ function t(true) { }
· ────
╰────
× Identifier expected. 'false' is a reserved word that cannot be used here.
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/399/input.js:1:12]
1 │ function t(false) { }
· ─────
╰────
× Identifier expected. 'null' is a reserved word that cannot be used here.
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/400/input.js:1:12]
1 │ function t(null) { }
· ────
╰────
× Expected `Identifier` but found `null`
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/401/input.js:1:10]
1 │ function null() { }
· ──┬─
· ╰── `Identifier` expected
╰────
× Expected `Identifier` but found `true`
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/402/input.js:1:10]
1 │ function true() { }
· ──┬─
· ╰── `Identifier` expected
╰────
× Expected `Identifier` but found `false`
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/403/input.js:1:10]
1 │ function false() { }
· ──┬──
· ╰── `Identifier` expected
╰────
× Expected `Identifier` but found `if`
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/404/input.js:1:10]
1 │ function if() { }
· ─┬
· ╰── `Identifier` expected
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/405/input.js:1:2]
1 │ a b;
· ▲
╰────
help: Try inserting a semicolon here
× Expected `(` but found `.`
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/406/input.js:1:3]
1 │ if.a;
· ┬
· ╰── `(` expected
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/407/input.js:1:2]
1 │ a if;
· ▲
╰────
help: Try inserting a semicolon here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/408/input.js:1:2]
1 │ a class;
· ▲
╰────
help: Try inserting a semicolon here
× Illegal break statement
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/409/input.js:1:1]
1 │ break
· ─────
╰────
help: A `break` statement can only be used within an enclosing iteration or switch statement.
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/410/input.js:1:7]
1 │ break 1;
· ─
╰────
× Illegal continue statement: no surrounding iteration statement
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/411/input.js:1:1]
1 │ continue
· ────────
╰────
help: A `continue` statement can only be used within an enclosing `for`, `while` or `do while`
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/412/input.js:1:10]
1 │ continue 2;
· ─
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/413/input.js:1:6]
1 │ throw
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/414/input.js:1:6]
1 │ throw;
· ─
╰────
× Only a single declaration is allowed in a `for...in` statement
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/415/input.js:1:6]
1 │ for (var i, i2 in {});
· ─────────
╰────
× Expected `;` but found `)`
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/416/input.js:1:15]
1 │ for ((i in {}));
· ┬
· ╰── `;` expected
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/417/input.js:1:6]
1 │ for (i + 1 in {});
· ─────
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/418/input.js:1:6]
1 │ for (+i in {});
· ──
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/419/input.js:1:10]
1 │ if(false)
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/420/input.js:1:25]
1 │ if(false) doThis(); else
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/421/input.js:1:3]
1 │ do
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/422/input.js:1:13]
1 │ while(false)
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/423/input.js:1:8]
1 │ for(;;)
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/424/input.js:1:8]
1 │ with(x)
╰────
× Missing catch or finally clause
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/425/input.js:1:8]
1 │ try { }
╰────
help: Either unwrap this try block or add catch / finally clause
× Invalid Character `‿`
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/426/input.js:1:1]
1 │ ‿ = 10
· ─
╰────
× TS(1113): A 'default' clause cannot appear more than once in a 'switch' statement.
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/427/input.js:1:14]
1 │ switch (c) { default: default: }
· ────┬─── ────┬───
· │ ╰── Another 'default' clause cannot appear here.
· ╰── First 'default' clause is here.
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/428/input.js:1:9]
1 │ new X()."s"
· ───
╰────
× Unterminated multiline comment
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/429/input.js:1:1]
1 │ /*
· ──
╰────
× Unterminated multiline comment
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/430/input.js:1:1]
1 │ ╭─▶ /*
2 │ │
3 │ ╰─▶
╰────
× Unterminated multiline comment
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/431/input.js:1:1]
1 │ /**
· ───
╰────
× Unterminated multiline comment
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/432/input.js:1:1]
1 │ ╭─▶ /*
2 │ │
3 │ ╰─▶ *
╰────
× Unterminated multiline comment
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/433/input.js:1:1]
1 │ /*hello
· ───────
╰────
× Unterminated multiline comment
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/434/input.js:1:1]
1 │ /*hello *
· ──────────
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/435/input.js:2:1]
1 │
2 │ ]
· ─
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/436/input.js:2:1]
1 │
]
· ─
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/437/input.js:2:1]
1 │
2 │ ]
· ─
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/438/input.js:3:1]
2 │
]
· ─
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/439/input.js:2:1]
1 │ //
2 │ ]
· ─
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/440/input.js:3:1]
2 │
]
· ─
╰────
× Unterminated regular expression
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/441/input.js:1:1]
1 │ /a\
· ────
2 │ /
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/441/input.js:1:1]
1 │ ╭─▶ /a\
2 │ ╰─▶ /
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/442/input.js:3:1]
2 │
3 │ ]
· ─
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/443/input.js:2:3]
1 │ /*
2 │ */]
· ─
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/444/input.js:3:3]
2 │
*/]
· ─
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/445/input.js:3:3]
2 │
3 │ */]
· ─
╰────
× Invalid Unicode escape sequence
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/446/input.js:1:2]
1 │ \\
· ─
╰────
× Invalid Character `\`
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/447/input.js:1:7]
1 │ \u005c
╰────
× Invalid Unicode escape sequence
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/448/input.js:1:2]
1 │ \x
· ─
╰────
× Invalid Character ``
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/449/input.js:1:7]
1 │ \u0000
╰────
× Invalid Character `‌`
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/450/input.js:1:1]
1 │ ‌ = []
· ─
╰────
× Invalid Character `‍`
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/451/input.js:1:1]
1 │ ‍ = []
· ─
╰────
× Unterminated string
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/452/input.js:1:1]
1 │ "\
· ──
╰────
× Unterminated string
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/452/input.js:1:1]
1 │ "\
· ──
╰────
× Invalid escape sequence
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/453/input.js:1:2]
1 │ "\u
· ──
╰────
× Unterminated string
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/453/input.js:1:1]
1 │ "\u
· ───
╰────
× TS(1108): A 'return' statement can only be used within a function body.
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/454/input.js:1:1]
1 │ return
· ──────
╰────
× Illegal break statement
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/455/input.js:1:1]
1 │ break
· ─────
╰────
help: A `break` statement can only be used within an enclosing iteration or switch statement.
× Illegal continue statement: no surrounding iteration statement
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/456/input.js:1:1]
1 │ continue
· ────────
╰────
help: A `continue` statement can only be used within an enclosing `for`, `while` or `do while`
× Illegal continue statement: no surrounding iteration statement
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/457/input.js:1:23]
1 │ switch (x) { default: continue; }
· ─────────
╰────
help: A `continue` statement can only be used within an enclosing `for`, `while` or `do while`
× Expected `while` but found `*`
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/458/input.js:1:10]
1 │ do { x } *
· ┬
· ╰── `while` expected
╰────
× Use of undefined label
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/459/input.js:1:22]
1 │ while (true) { break x; }
· ─
╰────
× Use of undefined label
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/460/input.js:1:25]
1 │ while (true) { continue x; }
· ─
╰────
× Jump target cannot cross function boundary.
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/461/input.js:1:40]
1 │ x: while (true) { (function () { break x; }); }
· ─
╰────
× Jump target cannot cross function boundary.
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/462/input.js:1:43]
1 │ x: while (true) { (function () { continue x; }); }
· ─
╰────
× Illegal break statement
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/463/input.js:1:34]
1 │ x: while (true) { (function () { break; }); }
· ──────
╰────
help: A `break` statement can only be used within an enclosing iteration or switch statement.
× Illegal continue statement: no surrounding iteration statement
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/464/input.js:1:34]
1 │ x: while (true) { (function () { continue; }); }
· ─────────
╰────
help: A `continue` statement can only be used within an enclosing `for`, `while` or `do while`
× Label `x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/465/input.js:1:1]
1 │ x: while (true) { x: while (true) { } }
· ┬ ┬
· │ ╰── It can not be redeclared here
· ╰── `x` has already been declared here
╰────
× Delete of an unqualified identifier in strict mode.
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/466/input.js:1:37]
1 │ (function () { 'use strict'; delete i; }())
· ─
╰────
× 'with' statements are not allowed
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/467/input.js:1:30]
1 │ (function () { 'use strict'; with (i); }())
· ────
╰────
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/468/input.js:1:37]
1 │ function hello() {'use strict'; var eval = 10; }
· ────
╰────
note: This is strict mode code
× Cannot assign to 'arguments' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/469/input.js:1:37]
1 │ function hello() {'use strict'; var arguments = 10; }
· ─────────
╰────
note: This is strict mode code
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/470/input.js:1:48]
1 │ function hello() {'use strict'; try { } catch (eval) { } }
· ────
╰────
note: This is strict mode code
× Cannot assign to 'arguments' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/471/input.js:1:48]
1 │ function hello() {'use strict'; try { } catch (arguments) { } }
· ─────────
╰────
note: This is strict mode code
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/472/input.js:1:33]
1 │ function hello() {'use strict'; eval = 10; }
· ────
╰────
note: This is strict mode code
× Cannot assign to 'arguments' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/473/input.js:1:33]
1 │ function hello() {'use strict'; arguments = 10; }
· ─────────
╰────
note: This is strict mode code
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/474/input.js:1:35]
1 │ function hello() {'use strict'; ++eval; }
· ────
╰────
note: This is strict mode code
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/475/input.js:1:35]
1 │ function hello() {'use strict'; --eval; }
· ────
╰────
note: This is strict mode code
× Cannot assign to 'arguments' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/476/input.js:1:35]
1 │ function hello() {'use strict'; ++arguments; }
· ─────────
╰────
note: This is strict mode code
× Cannot assign to 'arguments' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/477/input.js:1:35]
1 │ function hello() {'use strict'; --arguments; }
· ─────────
╰────
note: This is strict mode code
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/478/input.js:1:33]
1 │ function hello() {'use strict'; eval++; }
· ────
╰────
note: This is strict mode code
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/479/input.js:1:33]
1 │ function hello() {'use strict'; eval--; }
· ────
╰────
note: This is strict mode code
× Cannot assign to 'arguments' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/480/input.js:1:33]
1 │ function hello() {'use strict'; arguments++; }
· ─────────
╰────
note: This is strict mode code
× Cannot assign to 'arguments' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/481/input.js:1:33]
1 │ function hello() {'use strict'; arguments--; }
· ─────────
╰────
note: This is strict mode code
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/482/input.js:1:42]
1 │ function hello() {'use strict'; function eval() { } }
· ────
╰────
note: This is strict mode code
× Cannot assign to 'arguments' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/483/input.js:1:42]
1 │ function hello() {'use strict'; function arguments() { } }
· ─────────
╰────
note: This is strict mode code
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/484/input.js:1:10]
1 │ function eval() {'use strict'; }
· ────
╰────
note: This is strict mode code
× Cannot assign to 'arguments' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/485/input.js:1:10]
1 │ function arguments() {'use strict'; }
· ─────────
╰────
note: This is strict mode code
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/486/input.js:1:43]
1 │ function hello() {'use strict'; (function eval() { }()) }
· ────
╰────
note: This is strict mode code
× Cannot assign to 'arguments' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/487/input.js:1:43]
1 │ function hello() {'use strict'; (function arguments() { }()) }
· ─────────
╰────
note: This is strict mode code
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/488/input.js:1:11]
1 │ (function eval() {'use strict'; })()
· ────
╰────
note: This is strict mode code
× Cannot assign to 'arguments' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/489/input.js:1:11]
1 │ (function arguments() {'use strict'; })()
· ─────────
╰────
note: This is strict mode code
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/490/input.js:1:48]
1 │ function hello() {'use strict'; ({ s: function eval() { } }); }
· ────
╰────
note: This is strict mode code
× The keyword 'package' is reserved
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/491/input.js:1:11]
1 │ (function package() {'use strict'; })()
· ───────
╰────
note: This identifier is reserved in strict mode code
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/492/input.js:1:49]
1 │ function hello() {'use strict'; ({ i: 10, set s(eval) { } }); }
· ────
╰────
note: This is strict mode code
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/493/input.js:1:42]
1 │ function hello() {'use strict'; ({ set s(eval) { } }); }
· ────
╰────
note: This is strict mode code
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/494/input.js:1:50]
1 │ function hello() {'use strict'; ({ s: function s(eval) { } }); }
· ────
╰────
note: This is strict mode code
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/495/input.js:1:16]
1 │ function hello(eval) {'use strict';}
· ────
╰────
note: This is strict mode code
× Cannot assign to 'arguments' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/496/input.js:1:16]
1 │ function hello(arguments) {'use strict';}
· ─────────
╰────
note: This is strict mode code
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/497/input.js:1:49]
1 │ function hello() { 'use strict'; function inner(eval) {} }
· ────
╰────
note: This is strict mode code
× Cannot assign to 'arguments' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/498/input.js:1:49]
1 │ function hello() { 'use strict'; function inner(arguments) {} }
· ─────────
╰────
note: This is strict mode code
× '0'-prefixed octal literals and octal escape sequences are deprecated
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/500/input.js:1:34]
1 │ function hello() { 'use strict'; 021; }
· ───
╰────
help: for octal literals use the '0o' prefix instead
× '0'-prefixed octal literals and octal escape sequences are deprecated
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/502/input.js:1:37]
1 │ function hello() { 'use strict'; ({ 021: 42 }); }
· ───
╰────
help: for octal literals use the '0o' prefix instead
× The keyword 'implements' is reserved
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/504/input.js:1:38]
1 │ function hello() { "use strict"; var implements; }
· ──────────
╰────
note: This identifier is reserved in strict mode code
× The keyword 'interface' is reserved
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/505/input.js:1:38]
1 │ function hello() { "use strict"; var interface; }
· ─────────
╰────
note: This identifier is reserved in strict mode code
× The keyword 'package' is reserved
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/506/input.js:1:38]
1 │ function hello() { "use strict"; var package; }
· ───────
╰────
note: This identifier is reserved in strict mode code
× The keyword 'private' is reserved
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/507/input.js:1:38]
1 │ function hello() { "use strict"; var private; }
· ───────
╰────
note: This identifier is reserved in strict mode code
× The keyword 'protected' is reserved
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/508/input.js:1:38]
1 │ function hello() { "use strict"; var protected; }
· ─────────
╰────
note: This identifier is reserved in strict mode code
× The keyword 'public' is reserved
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/509/input.js:1:38]
1 │ function hello() { "use strict"; var public; }
· ──────
╰────
note: This identifier is reserved in strict mode code
× The keyword 'static' is reserved
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/510/input.js:1:38]
1 │ function hello() { "use strict"; var static; }
· ──────
╰────
note: This identifier is reserved in strict mode code
× The keyword 'static' is reserved
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/511/input.js:1:16]
1 │ function hello(static) { "use strict"; }
· ──────
╰────
note: This identifier is reserved in strict mode code
× The keyword 'static' is reserved
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/512/input.js:1:10]
1 │ function static() { "use strict"; }
· ──────
╰────
note: This identifier is reserved in strict mode code
× The keyword 'static' is reserved
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/513/input.js:1:24]
1 │ "use strict"; function static() { }
· ──────
╰────
note: This identifier is reserved in strict mode code
× Identifier `t` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/514/input.js:1:12]
1 │ function a(t, t) { "use strict"; }
· ┬ ┬
· │ ╰── It can not be redeclared here
· ╰── `t` has already been declared here
╰────
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/515/input.js:1:12]
1 │ function a(eval) { "use strict"; }
· ────
╰────
note: This is strict mode code
× The keyword 'package' is reserved
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/516/input.js:1:12]
1 │ function a(package) { "use strict"; }
· ───────
╰────
note: This identifier is reserved in strict mode code
× Identifier `t` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/517/input.js:1:41]
1 │ function a() { "use strict"; function b(t, t) { }; }
· ┬ ┬
· │ ╰── It can not be redeclared here
· ╰── `t` has already been declared here
╰────
× Identifier `t` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/518/input.js:1:13]
1 │ (function a(t, t) { "use strict"; })
· ┬ ┬
· │ ╰── It can not be redeclared here
· ╰── `t` has already been declared here
╰────
× Identifier `t` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/519/input.js:1:42]
1 │ function a() { "use strict"; (function b(t, t) { }); }
· ┬ ┬
· │ ╰── It can not be redeclared here
· ╰── `t` has already been declared here
╰────
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/520/input.js:1:13]
1 │ (function a(eval) { "use strict"; })
· ────
╰────
note: This is strict mode code
× The keyword 'package' is reserved
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/521/input.js:1:13]
1 │ (function a(package) { "use strict"; })
· ───────
╰────
note: This identifier is reserved in strict mode code
× '0'-prefixed octal literals and octal escape sequences are deprecated
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/522/input.js:1:66]
1 │ "use strict";function foo(){"use strict";}function bar(){var v = 015}
· ───
╰────
help: for octal literals use the '0o' prefix instead
× Identifier expected. 'this' is a reserved word that cannot be used here.
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/523/input.js:1:5]
1 │ var this = 10;
· ────
╰────
× Illegal newline after throw
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/524/input.js:1:1]
1 │ throw
· ──┬──
· ╰── throw starts here
2 │ 10;
· ─┬
· ╰── A newline is not expected here
╰────
× Missing initializer in const declaration
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/536/input.js:1:7]
1 │ const a;
· ─
╰────
help: Add an initializer (e.g. ` = undefined`) here
× The keyword 'public' is reserved
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/544/input.js:2:9]
1 │ "use strict";
2 │ const { public } = foo();
· ──────
╰────
note: This identifier is reserved in strict mode code
× The keyword 'public' is reserved
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/545/input.js:1:9]
1 │ const { public } = foo();
· ──────
╰────
note: Modules are always strict mode code
× '0'-prefixed octal literals and octal escape sequences are deprecated
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/550/input.js:2:11]
1 │ 'use strict';
2 │ const a = 07;
· ──
╰────
help: for octal literals use the '0o' prefix instead
× Decimals with leading zeros are not allowed in strict mode
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/552/input.js:2:11]
1 │ 'use strict';
2 │ const a = 08;
· ──
╰────
help: remove the leading zero
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/554/input.js:1:14]
1 │ var a = 0123.;
· ─
╰────
× A rest parameter must be last in a parameter list
╭─[babel/packages/babel-parser/test/fixtures/core/uncategorised/555/input.js:3:5]
2 │ first,
3 │ ...second,
· ─────────
4 │ third,
╰────
× A rest parameter or binding pattern may not have a trailing comma.
╭─[babel/packages/babel-parser/test/fixtures/es2015/array-rest-spread/comma-after-rest/input.js:1:6]
1 │ [...a,] = [];
· ─
╰────
help: Remove the trailing comma here
× A rest parameter or binding pattern may not have a trailing comma.
╭─[babel/packages/babel-parser/test/fixtures/es2015/array-rest-spread/comma-after-spread-for-in/input.js:1:11]
1 │ for ([...a,] in []);
· ─
╰────
help: Remove the trailing comma here
× A rest parameter or binding pattern may not have a trailing comma.
╭─[babel/packages/babel-parser/test/fixtures/es2015/array-rest-spread/comma-after-spread-nested/input.js:1:7]
1 │ [[...a,]] = [];
· ─
╰────
help: Remove the trailing comma here
× Spread must be last element
╭─[babel/packages/babel-parser/test/fixtures/es2015/array-rest-spread/invalid-location/input.js:1:2]
1 │ [...a, b] = c
· ────
╰────
× A rest parameter or binding pattern may not have a trailing comma.
╭─[babel/packages/babel-parser/test/fixtures/es2015/arrow-functions/comma-after-rest-param/input.js:1:9]
1 │ (...rest,) => {}
· ─
╰────
help: Remove the trailing comma here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2015/arrow-functions/inner-parens/input.js:1:18]
1 │ var foo = ((foo)) => {};
· ▲
╰────
help: Try inserting a semicolon here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2015/arrow-functions/inner-parens-2/input.js:1:9]
1 │ (a, (b)) => 42
· ▲
╰────
help: Try inserting a semicolon here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2015/arrow-functions/inner-parens-array-pattern/input.js:1:8]
1 │ ([(a)]) => {}
· ▲
╰────
help: Try inserting a semicolon here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2015/arrow-functions/inner-parens-array-pattern-2/input.js:1:22]
1 │ ([ [(a)] = [] ] = []) => {}
· ▲
╰────
help: Try inserting a semicolon here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2015/arrow-functions/inner-parens-array-pattern-3/input.js:1:19]
1 │ ([(a) = [] ] = []) => {}
· ▲
╰────
help: Try inserting a semicolon here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2015/arrow-functions/inner-parens-object-pattern/input.js:1:20]
1 │ ({ a: (foo) } = {}) => {}
· ▲
╰────
help: Try inserting a semicolon here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2015/arrow-functions/inner-parens-object-pattern-member/input.js:1:24]
1 │ ({ a: (foo.qux) } = {}) => {}
· ▲
╰────
help: Try inserting a semicolon here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2015/arrow-functions/invalid-arrow-before-in/input.js:1:9]
1 │ () => {} in x
· ▲
╰────
help: Try inserting a semicolon here
× Empty parenthesized expression
╭─[babel/packages/babel-parser/test/fixtures/es2015/arrow-functions/invalid-parens-binary-argument/input.js:1:9]
1 │ true || () => {}
· ──
╰────
× Empty parenthesized expression
╭─[babel/packages/babel-parser/test/fixtures/es2015/arrow-functions/invalid-parens-class-heritage/input.js:1:17]
1 │ class C extends () => {} {}
· ──
╰────
× Empty parenthesized expression
╭─[babel/packages/babel-parser/test/fixtures/es2015/arrow-functions/invalid-parens-unary-argument/input.js:1:20]
1 │ console.log(typeof () => {});
· ──
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/es2015/arrow-functions/invalid-rest-in-params/input.js:3:5]
2 │ first,
3 │ ...second,
· ───
4 │ third
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2015/arrow-functions/invalid-single-binding-binary-argument/input.js:1:10]
1 │ true || x => {}
· ▲
╰────
help: Try inserting a semicolon here
× Expected `{` but found `=>`
╭─[babel/packages/babel-parser/test/fixtures/es2015/arrow-functions/invalid-single-binding-class-heritage/input.js:1:19]
1 │ class C extends x => {} {}
· ─┬
· ╰── `{` expected
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2015/arrow-functions/invalid-single-binding-unary-argument/input.js:1:9]
1 │ typeof x => {}
· ▲
╰────
help: Try inserting a semicolon here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2015/arrow-functions/no-binary-left/input.js:1:9]
1 │ () => {} || true
· ▲
╰────
help: Try inserting a semicolon here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2015/arrow-functions/no-callee/input.js:1:9]
1 │ () => {}()
· ▲
╰────
help: Try inserting a semicolon here
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/es2015/arrow-functions/no-for-in-init-concise-binary-in/input.js:1:6]
1 │ for (() => x in y;;);
· ───────
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2015/arrow-functions/no-ternary-test/input.js:1:9]
1 │ () => {} ? 1 : 2;
· ▲
╰────
help: Try inserting a semicolon here
× 'with' statements are not allowed
╭─[babel/packages/babel-parser/test/fixtures/es2015/class/extends-strict/input.js:2:3]
1 │ class C extends (function B() {
2 │ with ({});
· ────
3 │ return B;
╰────
× Keywords cannot contain escape characters
╭─[babel/packages/babel-parser/test/fixtures/es2015/class/invalid-escape-get/input.js:1:11]
1 │ class X { ge\u0074 x() {} }
· ────────
╰────
× Keywords cannot contain escape characters
╭─[babel/packages/babel-parser/test/fixtures/es2015/class/invalid-escape-set/input.js:1:11]
1 │ class X { se\u0074 x(value) {} }
· ────────
╰────
× Keywords cannot contain escape characters
╭─[babel/packages/babel-parser/test/fixtures/es2015/class/invalid-escape-static/input.js:1:11]
1 │ class X { st\u0061tic y() {} }
· ───────────
╰────
× 'super' can only be referenced in members of derived classes or object literal expressions.
╭─[babel/packages/babel-parser/test/fixtures/es2015/class-methods/direct-super-in-object-method/input.js:4:14]
3 │ get: function(){
4 │ return super.foo;
· ─────
5 │ }
╰────
× TS(2337): Super calls are not permitted outside constructors or in nested functions inside constructors.
╭─[babel/packages/babel-parser/test/fixtures/es2015/class-methods/direct-super-outside-constructor/input.js:2:9]
1 │ class A {
2 │ x () {super()}
· ───────
3 │ }
╰────
× Expected `;` but found `Identifier`
╭─[babel/packages/babel-parser/test/fixtures/es2015/class-methods/disallow-computed-async-identifier/input.js:2:11]
1 │ class A {
2 │ [async] a() {}
· ┬
· ╰── `;` expected
3 │ }
╰────
× Expected `;` but found `Identifier`
╭─[babel/packages/babel-parser/test/fixtures/es2015/class-methods/disallow-computed-async-string/input.js:2:13]
1 │ class A {
2 │ ["async"] a() {}
· ┬
· ╰── `;` expected
3 │ }
╰────
× Expected `;` but found `Identifier`
╭─[babel/packages/babel-parser/test/fixtures/es2015/class-methods/disallow-computed-get-identifier/input.js:2:9]
1 │ class A {
2 │ [get] a() {}
· ┬
· ╰── `;` expected
3 │ }
╰────
× Expected `;` but found `Identifier`
╭─[babel/packages/babel-parser/test/fixtures/es2015/class-methods/disallow-computed-get-string/input.js:2:11]
1 │ class A {
2 │ ["get"] a() {}
· ┬
· ╰── `;` expected
3 │ }
╰────
× Identifier `a` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2015/class-methods/disallow-duplicate-method-params/input.js:2:9]
1 │ class Foo {
2 │ bar(a, a) {}
· ┬ ┬
· │ ╰── It can not be redeclared here
· ╰── `a` has already been declared here
3 │ }
╰────
× Expected `;` but found `Identifier`
╭─[babel/packages/babel-parser/test/fixtures/es2015/class-methods/disallow-literal-async/input.js:2:11]
1 │ class A {
2 │ "async" a() {}
· ┬
· ╰── `;` expected
3 │ }
╰────
× Expected `;` but found `Identifier`
╭─[babel/packages/babel-parser/test/fixtures/es2015/class-methods/disallow-literal-get/input.js:2:9]
1 │ class A {
2 │ "get" a() {}
· ┬
· ╰── `;` expected
3 │ }
╰────
× Classes may not have a static property named 'prototype'
╭─[babel/packages/babel-parser/test/fixtures/es2015/class-methods/disallow-static-generator-prototype/input.js:2:11]
1 │ class A {
2 │ static *prototype() {}
· ─────────
3 │ }
╰────
× Classes may not have a static property named 'prototype'
╭─[babel/packages/babel-parser/test/fixtures/es2015/class-methods/disallow-static-prototype/input.js:2:10]
1 │ class A {
2 │ static prototype() {}
· ─────────
3 │ }
╰────
× 'new super()' is not allowed
╭─[babel/packages/babel-parser/test/fixtures/es2015/class-methods/disallow-super-call-after-new/input.js:2:23]
1 │ class A extends class {} {
2 │ constructor() { new super() }
· ───────
3 │ }
╰────
× A 'get' accessor must not have any formal parameters.
╭─[babel/packages/babel-parser/test/fixtures/es2015/class-methods/getter-signature/input.js:2:12]
1 │ class A {
2 │ get prop (arg) {}
· ─────
3 │ }
╰────
help: Remove these parameters here
× 'super' can only be used with function calls or in property accesses
╭─[babel/packages/babel-parser/test/fixtures/es2015/class-methods/malformed-super-expression/input.js:3:5]
2 │ x () {
3 │ super - 1;
· ─────
4 │ }
╰────
help: Replace with `super()` or `super.prop` or `super[prop]`
× Cannot assign to 'arguments' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/es2015/destructuring/binding-arguments-module/input.js:1:9]
1 │ const { arguments } = foo();
· ─────────
╰────
note: Modules are always strict mode code
× Cannot assign to 'arguments' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/es2015/destructuring/binding-arguments-strict/input.js:2:9]
1 │ "use strict";
2 │ const { arguments } = foo();
· ─────────
╰────
note: This is strict mode code
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/es2015/destructuring/binding-eval/input.js:1:17]
1 │ 'use strict'; ({eval = defValue} = obj)
· ────
╰────
note: This is strict mode code
× Expected `:` but found `}`
╭─[babel/packages/babel-parser/test/fixtures/es2015/destructuring/binding-this/input.js:1:12]
1 │ var { this } = {};
· ┬
· ╰── `:` expected
╰────
× Only '=' operator can be used for specifying default value.
╭─[babel/packages/babel-parser/test/fixtures/es2015/destructuring/error-operator-for-default/input.js:1:3]
1 │ ([a += a] = a)
· ──────
╰────
help: Replace this operator with `=`.
× Expected `,` or `}` but found `(`
╭─[babel/packages/babel-parser/test/fixtures/es2015/destructuring/invalid-object-method/input.js:1:12]
1 │ const { foo() {} } = foo();
· ┬ ┬
· │ ╰── `,` or `}` expected
· ╰── Opened here
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/es2015/destructuring/parenthesized-lhs-array/input.js:1:1]
1 │ ([a]) = 2;
· ─────
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/es2015/destructuring/parenthesized-lhs-object/input.js:1:1]
1 │ ({a}) = 2;
· ─────
╰────
× Identifier `__proto__` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2015/duplicate-proto/in-new-expression/input.js:1:6]
1 │ new {__proto__: Number, __proto__: Number}.__proto__;
· ────┬──── ────┬────
· │ ╰── It can not be redeclared here
· ╰── `__proto__` has already been declared here
╰────
× Identifier `__proto__` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2015/duplicate-proto/with-assignment-expression/input.js:2:3]
1 │ ({
2 │ __proto__: a,
· ────┬────
· ╰── `__proto__` has already been declared here
3 │ __proto__: a,
· ────┬────
· ╰── It can not be redeclared here
4 │ a: a = 1
╰────
× Identifier `__proto__` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2015/duplicate-proto/without-assignment-expression/input.js:2:3]
1 │ ({
2 │ __proto__: a,
· ────┬────
· ╰── `__proto__` has already been declared here
3 │ __proto__: a,
· ────┬────
· ╰── It can not be redeclared here
4 │ })
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/es2015/for-in/bare-initializer/input.js:2:6]
1 │ var a;
2 │ for (a = 0 in {});
· ─────
╰────
× for-in loop variable declaration may not have an initializer
╭─[babel/packages/babel-parser/test/fixtures/es2015/for-in/const-initializer/input.js:1:6]
1 │ for (const a = 0 in {});
· ───────────
╰────
× for-in loop variable declaration may not have an initializer
╭─[babel/packages/babel-parser/test/fixtures/es2015/for-in/let-initializer/input.js:1:6]
1 │ for (let a = 0 in {});
· ─────────
╰────
× for-in loop variable declaration may not have an initializer
╭─[babel/packages/babel-parser/test/fixtures/es2015/for-in/strict-initializer/input.js:2:6]
1 │ 'use strict';
2 │ for (var a = 0 in {});
· ─────────
╰────
× for-in loop variable declaration may not have an initializer
╭─[babel/packages/babel-parser/test/fixtures/es2015/for-in/var-arraybindingpattern-initializer/input.js:1:6]
1 │ for (var [a] = 0 in {});
· ───────────
╰────
× for-in loop variable declaration may not have an initializer
╭─[babel/packages/babel-parser/test/fixtures/es2015/for-in/var-objectbindingpattern-initializer/input.js:1:6]
1 │ for (var {a} = 0 in {});
· ───────────
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/es2015/for-of/bare-initializer/input.js:2:6]
1 │ var a;
2 │ for (a = 0 of {});
· ─────
╰────
× Keywords cannot contain escape characters
╭─[babel/packages/babel-parser/test/fixtures/es2015/for-of/invalid-escape-of/input.js:1:8]
1 │ for (x \u006ff y) {}
· ───────
╰────
× Expected `)` but found `,`
╭─[babel/packages/babel-parser/test/fixtures/es2015/for-of/invalid-expr/input.js:1:16]
1 │ for (let x of y, z) {}
· ┬ ┬
· │ ╰── `)` expected
· ╰── Opened here
╰────
× The left-hand side of a `for...of` statement may not start with `let`
╭─[babel/packages/babel-parser/test/fixtures/es2015/for-of/invalid-let-as-identifier/input.js:1:6]
1 │ for (let.foo of []);
· ───────
2 │ for (let().bar of []);
╰────
× The left-hand side of a `for...of` statement may not start with `let`
╭─[babel/packages/babel-parser/test/fixtures/es2015/for-of/invalid-let-as-identifier/input.js:2:6]
1 │ for (let.foo of []);
2 │ for (let().bar of []);
· ─────────
3 │ for (let``.bar of []);
╰────
× The left-hand side of a `for...of` statement may not start with `let`
╭─[babel/packages/babel-parser/test/fixtures/es2015/for-of/invalid-let-as-identifier/input.js:3:6]
2 │ for (let().bar of []);
3 │ for (let``.bar of []);
· ─────────
╰────
× Keywords cannot contain escape characters
╭─[babel/packages/babel-parser/test/fixtures/es2015/generators/invalid-escape-yield/input.js:1:17]
1 │ (function* () { y\u0069eld; })
· ──────────
╰────
× Generators can only be declared at the top level or inside a block
╭─[babel/packages/babel-parser/test/fixtures/es2015/generators/invalid-hanging/input.js:1:8]
1 │ if (1) function *foo() {}
· ───────────────
╰────
× Generators can only be declared at the top level or inside a block
╭─[babel/packages/babel-parser/test/fixtures/es2015/generators/invalid-sloppy-function/input.js:1:11]
1 │ while (1) function *foo() {}
· ───────────────
╰────
× Invalid function declaration
╭─[babel/packages/babel-parser/test/fixtures/es2015/generators/invalid-sloppy-function/input.js:1:11]
1 │ while (1) function *foo() {}
· ──────────────────
╰────
help: In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement
× Identifier expected. 'const' is a reserved word that cannot be used here.
╭─[babel/packages/babel-parser/test/fixtures/es2015/identifiers/invalid-escape-seq-const/input.js:1:5]
1 │ var co\u{6e}st = 123;
· ──────────
2 │
╰────
× Identifier expected. 'export' is a reserved word that cannot be used here.
╭─[babel/packages/babel-parser/test/fixtures/es2015/identifiers/invalid-escape-seq-export/input.js:1:5]
1 │ var expor\u{74} = 123;
· ───────────
2 │
╰────
× Keywords cannot contain escape characters
╭─[babel/packages/babel-parser/test/fixtures/es2015/identifiers/invalid-escape-seq-if/input.js:1:1]
1 │ \u0069\u{66} (true) {}
· ────────────
╰────
× Identifier expected. 'import' is a reserved word that cannot be used here.
╭─[babel/packages/babel-parser/test/fixtures/es2015/identifiers/invalid-escape-seq-import/input.js:1:5]
1 │ var \u{69}\u{6d}\u{70}\u{6f}\u{72}\u{74} = 123;
· ────────────────────────────────────
2 │
╰────
× Keywords cannot contain escape characters
╭─[babel/packages/babel-parser/test/fixtures/es2015/identifiers/invalid-escape-seq-null/input.js:1:1]
1 │ nul\u{6c}
· ─────────
╰────
× Keywords cannot contain escape characters
╭─[babel/packages/babel-parser/test/fixtures/es2015/identifiers/invalid-escape-seq-true/input.js:1:1]
1 │ \u0074rue
· ─────────
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2015/let/invalid-escape/input.js:1:9]
1 │ le\u0074 x = 5
· ▲
╰────
help: Try inserting a semicolon here
× Lexical declaration cannot appear in a single-statement context
╭─[babel/packages/babel-parser/test/fixtures/es2015/let/let-array-with-newline/input.js:1:4]
1 │ ╭─▶ do let
2 │ ╰─▶ [x] = 0
3 │ while (false);
╰────
help: Wrap this declaration in a block statement
× The keyword 'let' is reserved
╭─[babel/packages/babel-parser/test/fixtures/es2015/let/let-as-identifier-strict-fail/input.js:2:1]
1 │ "use strict";
2 │ let + 1
· ───
╰────
note: This identifier is reserved in strict mode code
× `let` cannot be declared as a variable name inside of a `let` declaration
╭─[babel/packages/babel-parser/test/fixtures/es2015/let/let-at-binding-list-fail-1/input.js:1:7]
1 │ let { let } = {};
· ───
╰────
× `let` cannot be declared as a variable name inside of a `const` declaration
╭─[babel/packages/babel-parser/test/fixtures/es2015/let/let-at-binding-list-fail-10/input.js:1:8]
1 │ const [let = 10] = [];
· ───
╰────
× `let` cannot be declared as a variable name inside of a `let` declaration
╭─[babel/packages/babel-parser/test/fixtures/es2015/let/let-at-binding-list-fail-11/input.js:1:9]
1 │ let [...let] = [];
· ───
╰────
× `let` cannot be declared as a variable name inside of a `const` declaration
╭─[babel/packages/babel-parser/test/fixtures/es2015/let/let-at-binding-list-fail-12/input.js:1:11]
1 │ const [...let] = [];
· ───
╰────
× `let` cannot be declared as a variable name inside of a `const` declaration
╭─[babel/packages/babel-parser/test/fixtures/es2015/let/let-at-binding-list-fail-2/input.js:1:9]
1 │ const { let } = {};
· ───
╰────
× `let` cannot be declared as a variable name inside of a `let` declaration
╭─[babel/packages/babel-parser/test/fixtures/es2015/let/let-at-binding-list-fail-3/input.js:1:6]
1 │ let [let] = [];
· ───
╰────
× `let` cannot be declared as a variable name inside of a `const` declaration
╭─[babel/packages/babel-parser/test/fixtures/es2015/let/let-at-binding-list-fail-4/input.js:1:8]
1 │ const [let] = [];
· ───
╰────
× `let` cannot be declared as a variable name inside of a `let` declaration
╭─[babel/packages/babel-parser/test/fixtures/es2015/let/let-at-binding-list-fail-5/input.js:1:5]
1 │ let let
· ───
╰────
× `let` cannot be declared as a variable name inside of a `const` declaration
╭─[babel/packages/babel-parser/test/fixtures/es2015/let/let-at-binding-list-fail-6/input.js:1:7]
1 │ const let = ''
· ───
╰────
× `let` cannot be declared as a variable name inside of a `let` declaration
╭─[babel/packages/babel-parser/test/fixtures/es2015/let/let-at-binding-list-fail-7/input.js:1:7]
1 │ let { let = 10 } = {};
· ───
╰────
× `let` cannot be declared as a variable name inside of a `const` declaration
╭─[babel/packages/babel-parser/test/fixtures/es2015/let/let-at-binding-list-fail-8/input.js:1:9]
1 │ const { let = 10 } = {};
· ───
╰────
× `let` cannot be declared as a variable name inside of a `let` declaration
╭─[babel/packages/babel-parser/test/fixtures/es2015/let/let-at-binding-list-fail-9/input.js:1:6]
1 │ let [let = 10] = [];
· ───
╰────
× `let` cannot be declared as a variable name inside of a `let` declaration
╭─[babel/packages/babel-parser/test/fixtures/es2015/let/let-at-catch-block/input.js:2:7]
1 │ try {} catch (err) {
2 │ let let;
· ───
3 │ }
╰────
× Unexpected new.target expression
╭─[babel/packages/babel-parser/test/fixtures/es2015/meta-properties/invalid-arrow-function/input.js:2:3]
1 │ const A = () => {
2 │ new.target;
· ──────────
3 │ }
╰────
help: new.target is only allowed in constructors, functions, and class field initializers
× The only valid meta property for new is new.target
╭─[babel/packages/babel-parser/test/fixtures/es2015/meta-properties/new-invalid-prop/input.js:2:3]
1 │ function f() {
2 │ new.prop
· ────────
3 │ }
╰────
× Unexpected new.target expression
╭─[babel/packages/babel-parser/test/fixtures/es2015/meta-properties/new-target-invalid/input.js:1:1]
1 │ new.target
· ──────────
╰────
help: new.target is only allowed in constructors, functions, and class field initializers
× Keywords cannot contain escape characters
╭─[babel/packages/babel-parser/test/fixtures/es2015/meta-properties/new-target-invalid-escaped-new/input.js:1:16]
1 │ function f() { n\u0065w.target; }
· ────────
╰────
× Keywords cannot contain escape characters
╭─[babel/packages/babel-parser/test/fixtures/es2015/meta-properties/new-target-invalid-escaped-target/input.js:1:20]
1 │ function f() { new.ta\u0072get; }
· ───────────
╰────
× TS(2528): A module cannot have multiple default exports.
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/duplicate-export-default/input.js:1:8]
1 │ export default {};
· ───────
2 │ export default function() {};
· ───────
╰────
× TS(2528): A module cannot have multiple default exports.
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/duplicate-export-default-and-export-as-default/input.js:1:8]
1 │ export default function() {};
· ───────
2 │ export { foo as default };
· ───────
╰────
× Export 'foo' is not defined
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/duplicate-export-default-and-export-as-default/input.js:2:10]
1 │ export default function() {};
2 │ export { foo as default };
· ───
╰────
× Duplicated export 'foo'
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export/input.js:1:10]
1 │ export { foo };
· ─┬─
· ╰── Export has already been declared here
2 │ export { bar as foo };
· ─┬─
· ╰── It cannot be redeclared here
╰────
× Export 'foo' is not defined
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export/input.js:1:10]
1 │ export { foo };
· ───
2 │ export { bar as foo };
╰────
× Export 'bar' is not defined
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export/input.js:2:10]
1 │ export { foo };
2 │ export { bar as foo };
· ───
╰────
× Duplicated export 'Foo'
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-class-declaration/input.js:1:10]
1 │ export { Foo };
· ─┬─
· ╰── Export has already been declared here
2 │ export class Foo {};
· ─┬─
· ╰── It cannot be redeclared here
╰────
× Duplicated export 'foo'
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring-assignment/input.js:1:10]
1 │ export { foo };
· ─┬─
· ╰── Export has already been declared here
2 │ export const { foo = 1 } = bar;
· ─┬─
· ╰── It cannot be redeclared here
╰────
× Duplicated export 'foo'
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring10/input.js:1:17]
1 │ export function foo() {};
· ─┬─
· ╰── Export has already been declared here
2 │ export const { a: [{foo}] } = bar;
· ─┬─
· ╰── It cannot be redeclared here
╰────
× Identifier `foo` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring10/input.js:1:17]
1 │ export function foo() {};
· ─┬─
· ╰── `foo` has already been declared here
2 │ export const { a: [{foo}] } = bar;
· ─┬─
· ╰── It can not be redeclared here
╰────
× Duplicated export 'foo4'
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring11/input.js:1:17]
1 │ export function foo4() {};
· ──┬─
· ╰── Export has already been declared here
2 │ export const [{ a: [{ foo }], b: { foo2: [{ foo3: foo4 }] } }] = bar;
· ──┬─
· ╰── It cannot be redeclared here
╰────
× Identifier `foo4` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring11/input.js:1:17]
1 │ export function foo4() {};
· ──┬─
· ╰── `foo4` has already been declared here
2 │ export const [{ a: [{ foo }], b: { foo2: [{ foo3: foo4 }] } }] = bar;
· ──┬─
· ╰── It can not be redeclared here
╰────
× Duplicated export 'foo4'
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring12/input.js:1:17]
1 │ export function foo4() {};
· ──┬─
· ╰── Export has already been declared here
2 │ export const { a: [{ foo }], b: { foo2: [{ foo3: foo4 }] } } = bar;
· ──┬─
· ╰── It cannot be redeclared here
╰────
× Identifier `foo4` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring12/input.js:1:17]
1 │ export function foo4() {};
· ──┬─
· ╰── `foo4` has already been declared here
2 │ export const { a: [{ foo }], b: { foo2: [{ foo3: foo4 }] } } = bar;
· ──┬─
· ╰── It can not be redeclared here
╰────
× Duplicated export 'foo4'
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring13/input.js:1:17]
1 │ export function foo4() {};
· ──┬─
· ╰── Export has already been declared here
2 │ export const { a: [{ foo4: foo }], b, c: { foo2: [{ foo3: foo4 }] } } = bar;
· ──┬─
· ╰── It cannot be redeclared here
╰────
× Identifier `foo4` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring13/input.js:1:17]
1 │ export function foo4() {};
· ──┬─
· ╰── `foo4` has already been declared here
2 │ export const { a: [{ foo4: foo }], b, c: { foo2: [{ foo3: foo4 }] } } = bar;
· ──┬─
· ╰── It can not be redeclared here
╰────
× Duplicated export 'foo'
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring14/input.js:1:14]
1 │ export const foo = 1;
· ─┬─
· ╰── Export has already been declared here
2 │ export const { foo2: foo } = bar;
· ─┬─
· ╰── It cannot be redeclared here
3 │
╰────
× Identifier `foo` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring14/input.js:1:14]
1 │ export const foo = 1;
· ─┬─
· ╰── `foo` has already been declared here
2 │ export const { foo2: foo } = bar;
· ─┬─
· ╰── It can not be redeclared here
3 │
╰────
× Duplicated export 'foo2'
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring15/input.js:1:21]
1 │ export const { foo: foo2 } = bar;
· ──┬─
· ╰── Export has already been declared here
2 │ export const foo2 = 1;
· ──┬─
· ╰── It cannot be redeclared here
3 │
╰────
× Identifier `foo2` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring15/input.js:1:21]
1 │ export const { foo: foo2 } = bar;
· ──┬─
· ╰── `foo2` has already been declared here
2 │ export const foo2 = 1;
· ──┬─
· ╰── It can not be redeclared here
3 │
╰────
× Duplicated export 'foo'
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring16/input.js:1:14]
1 │ export const foo = 1;
· ─┬─
· ╰── Export has already been declared here
2 │ export const [bar, ...foo] = baz;
· ─┬─
· ╰── It cannot be redeclared here
3 │
╰────
× Identifier `foo` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring16/input.js:1:14]
1 │ export const foo = 1;
· ─┬─
· ╰── `foo` has already been declared here
2 │ export const [bar, ...foo] = baz;
· ─┬─
· ╰── It can not be redeclared here
3 │
╰────
× Duplicated export 'bar'
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring17/input.js:1:23]
1 │ export const [foo, ...bar] = baz;
· ─┬─
· ╰── Export has already been declared here
2 │ export const bar = 1;
· ─┬─
· ╰── It cannot be redeclared here
3 │
╰────
× Identifier `bar` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring17/input.js:1:23]
1 │ export const [foo, ...bar] = baz;
· ─┬─
· ╰── `bar` has already been declared here
2 │ export const bar = 1;
· ─┬─
· ╰── It can not be redeclared here
3 │
╰────
× Duplicated export 'foo'
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring18/input.js:1:14]
1 │ export const foo = 1;
· ─┬─
· ╰── Export has already been declared here
2 │ export const [bar, [baz, ...foo]] = qux;
· ─┬─
· ╰── It cannot be redeclared here
3 │
╰────
× Identifier `foo` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring18/input.js:1:14]
1 │ export const foo = 1;
· ─┬─
· ╰── `foo` has already been declared here
2 │ export const [bar, [baz, ...foo]] = qux;
· ─┬─
· ╰── It can not be redeclared here
3 │
╰────
× Duplicated export 'foo'
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring19/input.js:1:14]
1 │ export const foo = 1;
· ─┬─
· ╰── Export has already been declared here
2 │ export const { bar: [baz, ...foo] } = qux;
· ─┬─
· ╰── It cannot be redeclared here
3 │
╰────
× Identifier `foo` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring19/input.js:1:14]
1 │ export const foo = 1;
· ─┬─
· ╰── `foo` has already been declared here
2 │ export const { bar: [baz, ...foo] } = qux;
· ─┬─
· ╰── It can not be redeclared here
3 │
╰────
× Duplicated export 'foo'
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring2/input.js:1:17]
1 │ export function foo() {};
· ─┬─
· ╰── Export has already been declared here
2 │ export const { foo } = bar;
· ─┬─
· ╰── It cannot be redeclared here
╰────
× Identifier `foo` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring2/input.js:1:17]
1 │ export function foo() {};
· ─┬─
· ╰── `foo` has already been declared here
2 │ export const { foo } = bar;
· ─┬─
· ╰── It can not be redeclared here
╰────
× Duplicated export 'foo'
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring3/input.js:1:16]
1 │ export const { foo } = bar;
· ─┬─
· ╰── Export has already been declared here
2 │ export function foo() {};
· ─┬─
· ╰── It cannot be redeclared here
╰────
× Identifier `foo` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring3/input.js:1:16]
1 │ export const { foo } = bar;
· ─┬─
· ╰── `foo` has already been declared here
2 │ export function foo() {};
· ─┬─
· ╰── It can not be redeclared here
╰────
× Duplicated export 'foo'
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring4/input.js:1:17]
1 │ export function foo() {};
· ─┬─
· ╰── Export has already been declared here
2 │ export const [foo] = bar;
· ─┬─
· ╰── It cannot be redeclared here
╰────
× Identifier `foo` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring4/input.js:1:17]
1 │ export function foo() {};
· ─┬─
· ╰── `foo` has already been declared here
2 │ export const [foo] = bar;
· ─┬─
· ╰── It can not be redeclared here
╰────
× Duplicated export 'foo'
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring5/input.js:1:15]
1 │ export const [foo] = bar;
· ─┬─
· ╰── Export has already been declared here
2 │ export function foo() {};
· ─┬─
· ╰── It cannot be redeclared here
╰────
× Identifier `foo` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring5/input.js:1:15]
1 │ export const [foo] = bar;
· ─┬─
· ╰── `foo` has already been declared here
2 │ export function foo() {};
· ─┬─
· ╰── It can not be redeclared here
╰────
× Duplicated export 'foo'
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring6/input.js:1:16]
1 │ export const { foo } = bar;
· ─┬─
· ╰── Export has already been declared here
2 │ export const [foo] = bar2;
· ─┬─
· ╰── It cannot be redeclared here
╰────
× Identifier `foo` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring6/input.js:1:16]
1 │ export const { foo } = bar;
· ─┬─
· ╰── `foo` has already been declared here
2 │ export const [foo] = bar2;
· ─┬─
· ╰── It can not be redeclared here
╰────
× Duplicated export 'foo'
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring7/input.js:1:15]
1 │ export const [foo] = bar;
· ─┬─
· ╰── Export has already been declared here
2 │ export const { foo } = bar2;
· ─┬─
· ╰── It cannot be redeclared here
╰────
× Identifier `foo` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring7/input.js:1:15]
1 │ export const [foo] = bar;
· ─┬─
· ╰── `foo` has already been declared here
2 │ export const { foo } = bar2;
· ─┬─
· ╰── It can not be redeclared here
╰────
× Duplicated export 'Foo'
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring8/input.js:1:14]
1 │ export class Foo {};
· ─┬─
· ╰── Export has already been declared here
2 │ export const { Foo } = bar;
· ─┬─
· ╰── It cannot be redeclared here
╰────
× Identifier `Foo` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring8/input.js:1:14]
1 │ export class Foo {};
· ─┬─
· ╰── `Foo` has already been declared here
2 │ export const { Foo } = bar;
· ─┬─
· ╰── It can not be redeclared here
╰────
× Duplicated export 'Foo'
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring9/input.js:1:14]
1 │ export class Foo {};
· ─┬─
· ╰── Export has already been declared here
2 │ export const [Foo] = bar;
· ─┬─
· ╰── It cannot be redeclared here
╰────
× Identifier `Foo` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring9/input.js:1:14]
1 │ export class Foo {};
· ─┬─
· ╰── `Foo` has already been declared here
2 │ export const [Foo] = bar;
· ─┬─
· ╰── It can not be redeclared here
╰────
× Duplicated export 'foo'
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-function-declaration/input.js:1:10]
1 │ export { foo };
· ─┬─
· ╰── Export has already been declared here
2 │ export function foo() {};
· ─┬─
· ╰── It cannot be redeclared here
╰────
× Duplicated export 'foo'
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-variable-declaration/input.js:1:10]
1 │ export { foo };
· ─┬─
· ╰── Export has already been declared here
2 │ export const foo = bar;
· ─┬─
· ╰── It cannot be redeclared here
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/export-default-variable-declaration/input.js:1:16]
1 │ export default const Foo = () => {
· ─────
2 │ return `<div class="bar">Hola</div>`;
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/export-default-variable-declaration2/input.js:1:19]
1 │ export default let Foo = () => {
· ▲
2 │ return `<div class="bar">Hola</div>`;
╰────
help: Try inserting a semicolon here
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/export-default-variable-declaration3/input.js:1:16]
1 │ export default var Foo = () => {
· ───
2 │ return `<div class="bar">Hola</div>`;
╰────
× Identifier expected. 'debugger' is a reserved word that cannot be used here.
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/import-invalid-keyword/input.js:1:10]
1 │ import { debugger } from "foo";
· ────────
╰────
× Identifier expected. 'typeof' is a reserved word that cannot be used here.
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/import-invalid-keyword-typeof/input.js:1:10]
1 │ import { typeof } from "foo";
· ──────
╰────
× Keywords cannot contain escape characters
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/invalid-escape-export-as/input.js:1:12]
1 │ export { X \u0061s Y }
· ───────
╰────
× Export 'X' is not defined
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/invalid-escape-export-as/input.js:1:10]
1 │ export { X \u0061s Y }
· ─
╰────
× Keywords cannot contain escape characters
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/invalid-escape-import-from/input.js:1:10]
1 │ import X fro\u006d 'x'
· ─────────
╰────
× HTML comments are not allowed in modules
╭─[babel/packages/babel-parser/test/fixtures/es2015/modules/invalid-xml-comment-in-module/input.js:1:1]
1 │ <!--bar-->
· ────
╰────
× Expected `,` or `}` but found `Identifier`
╭─[babel/packages/babel-parser/test/fixtures/es2015/object/async-method-linebreak/input.js:3:5]
1 │ ({
· ┬
· ╰── Opened here
2 │ async
3 │ foo() {}
· ─┬─
· ╰── `,` or `}` expected
4 │ })
╰────
× Identifier `a` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2015/object/disallow-duplicate-method-params/input.js:2:9]
1 │ ({
2 │ bar(a, a) {}
· ┬ ┬
· │ ╰── It can not be redeclared here
· ╰── `a` has already been declared here
3 │ })
╰────
× Expected `,` or `}` but found `*`
╭─[babel/packages/babel-parser/test/fixtures/es2015/object/invalid-accessor-generator/input.js:2:9]
1 │ ({
· ┬
· ╰── Opened here
2 │ get *iterator() { },
· ┬
· ╰── `,` or `}` expected
3 │ set *iterator(iter) { }
╰────
× Invalid assignment in object literal
╭─[babel/packages/babel-parser/test/fixtures/es2015/object/invalid-property-initializer/input.js:2:3]
1 │ const obj = {
2 │ foo = 123,
· ─────────
3 │ bar: x = 123
╰────
help: Did you mean to use a ':'? An '=' can only follow a property name when the containing object literal is part of a destructuring pattern.
× Invalid assignment in object literal
╭─[babel/packages/babel-parser/test/fixtures/es2015/object/invalid-property-initializer-1/input.js:3:3]
2 │ bar: x = 123,
3 │ foo = 123
· ─────────
4 │ };
╰────
help: Did you mean to use a ':'? An '=' can only follow a property name when the containing object literal is part of a destructuring pattern.
× Invalid assignment in object literal
╭─[babel/packages/babel-parser/test/fixtures/es2015/object/invalid-property-initializer-in-call/input.js:1:4]
1 │ f({x = 0})
· ─────
╰────
help: Did you mean to use a ':'? An '=' can only follow a property name when the containing object literal is part of a destructuring pattern.
× Invalid assignment in object literal
╭─[babel/packages/babel-parser/test/fixtures/es2015/object/invalid-property-initializer-in-rhs/input.js:1:8]
1 │ obj = {x = 0}
· ─────
╰────
help: Did you mean to use a ':'? An '=' can only follow a property name when the containing object literal is part of a destructuring pattern.
× Flag i is mentioned twice in regular expression literal
╭─[babel/packages/babel-parser/test/fixtures/es2015/regex/duplicate-flags/input.js:1:6]
1 │ /./gii;
· ─
╰────
help: Remove the duplicated flag here
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/es2015/regex/duplicate-flags/input.js:1:1]
1 │ /./gii;
· ──────
╰────
× Expected `:` but found `,`
╭─[babel/packages/babel-parser/test/fixtures/es2015/shorthand/reserved-word/input.js:1:17]
1 │ var x = ({ const, if, this });
· ┬
· ╰── `:` expected
╰────
× The keyword 'implements' is reserved
╭─[babel/packages/babel-parser/test/fixtures/es2015/shorthand/reserved-word-strict/input.js:2:12]
1 │ "use strict";
2 │ var x = ({ implements, interface, package });
· ──────────
╰────
note: This identifier is reserved in strict mode code
× The keyword 'interface' is reserved
╭─[babel/packages/babel-parser/test/fixtures/es2015/shorthand/reserved-word-strict/input.js:2:24]
1 │ "use strict";
2 │ var x = ({ implements, interface, package });
· ─────────
╰────
note: This identifier is reserved in strict mode code
× The keyword 'package' is reserved
╭─[babel/packages/babel-parser/test/fixtures/es2015/shorthand/reserved-word-strict/input.js:2:35]
1 │ "use strict";
2 │ var x = ({ implements, interface, package });
· ───────
╰────
note: This identifier is reserved in strict mode code
× Invalid class declaration
╭─[babel/packages/babel-parser/test/fixtures/es2015/statements/label-invalid-class/input.js:1:6]
1 │ foo: class X {}
· ────────
╰────
help: Classes can only be declared at top level or inside a block
× Lexical declaration cannot appear in a single-statement context
╭─[babel/packages/babel-parser/test/fixtures/es2015/statements/label-invalid-const/input.js:1:6]
1 │ foo: const bar = null;
· ─────────────────
╰────
help: Wrap this declaration in a block statement
× Async functions can only be declared at the top level or inside a block
╭─[babel/packages/babel-parser/test/fixtures/es2015/statements/label-invalid-func-async/input.js:1:6]
1 │ foo: async function bar() {}
· ────────────────────
╰────
× Generators can only be declared at the top level or inside a block
╭─[babel/packages/babel-parser/test/fixtures/es2015/statements/label-invalid-func-generator/input.js:1:6]
1 │ foo: function* bar() {}
· ───────────────
╰────
× Invalid function declaration
╭─[babel/packages/babel-parser/test/fixtures/es2015/statements/label-invalid-func-strict/input.js:1:36]
1 │ function foo() {"use strict"; bar: function baz() {}}
· ─────────────────
╰────
help: In strict mode code, functions can only be declared at top level or inside a block
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2015/statements/label-invalid-let/input.js:1:9]
1 │ foo: let bar;
· ▲
╰────
help: Try inserting a semicolon here
× Bad escape sequence in untagged template literal
╭─[babel/packages/babel-parser/test/fixtures/es2015/template/error-after-newline/input.js:1:2]
1 │ ╭─▶ `
2 │ ╰─▶ \u{12_34}
3 │ `;
╰────
× for-of loop variable declaration may not have an initializer
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/109/input.js:1:6]
1 │ for (var x = 42 of list) process(x);
· ──────────
╰────
× 'super' can only be referenced in a derived class.
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/123/input.js:1:16]
1 │ "use strict"; (class A {constructor() { super() }})
· ─────────────────┬──────────────────
· ╰── class does not have `extends`
╰────
help: either remove this super, or extend the class
× Multiple constructor implementations are not allowed.
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/125/input.js:1:11]
1 │ class A { constructor() {} 'constructor'() {} }
· ─────┬───── ──────┬──────
· │ ╰── it cannot be redeclared here
· ╰── constructor has already been declared here
╰────
× Constructor can't have get/set modifier
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/126/input.js:1:15]
1 │ class A { get constructor() {} }
· ───────────
╰────
× Constructor can't be a generator
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/127/input.js:1:12]
1 │ class A { *constructor() {} }
· ───────────
╰────
× Expected `:` but found `}`
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/151/input.js:1:6]
1 │ ({[x]})
· ┬
· ╰── `:` expected
╰────
× Identifier `a` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/166/input.js:1:12]
1 │ function x(a, { a }){}
· ┬ ┬
· │ ╰── It can not be redeclared here
· ╰── `a` has already been declared here
╰────
× Unexpected end of file
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/198/input.js:1:3]
1 │ 0o
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/199/input.js:1:4]
1 │ 0o1a
· ─
╰────
× Invalid Character `9`
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/200/input.js:1:3]
1 │ 0o9
· ▲
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/201/input.js:1:4]
1 │ 0o18
· ─
╰────
× Unexpected end of file
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/202/input.js:1:3]
1 │ 0O
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/203/input.js:1:4]
1 │ 0O1a
· ─
╰────
× Invalid Character `9`
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/204/input.js:1:3]
1 │ 0O9
· ▲
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/205/input.js:1:4]
1 │ 0O18
· ─
╰────
× Unexpected end of file
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/206/input.js:1:3]
1 │ 0b
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/207/input.js:1:4]
1 │ 0b1a
· ─
╰────
× Invalid Character `9`
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/208/input.js:1:3]
1 │ 0b9
· ▲
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/209/input.js:1:4]
1 │ 0b18
· ─
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/210/input.js:1:4]
1 │ 0b12
· ─
╰────
× Unexpected end of file
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/211/input.js:1:3]
1 │ 0B
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/212/input.js:1:4]
1 │ 0B1a
· ─
╰────
× Invalid Character `9`
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/213/input.js:1:3]
1 │ 0B9
· ▲
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/214/input.js:1:4]
1 │ 0B18
· ─
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/215/input.js:1:4]
1 │ 0B12
· ─
╰────
× Invalid escape sequence
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/216/input.js:1:2]
1 │ "\u{110000}"
· ─────────
╰────
× Invalid escape sequence
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/217/input.js:1:2]
1 │ "\u{}"
· ───
╰────
× Invalid escape sequence
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/218/input.js:1:2]
1 │ "\u{FFFF"
· ───────
╰────
× Invalid escape sequence
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/219/input.js:1:2]
1 │ "\u{FFZ}"
· ─────
╰────
× Invalid left-hand side in assignment
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/220/input.js:1:1]
1 │ [v] += ary
· ───
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/221/input.js:1:2]
1 │ [2] = 42
· ─
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/222/input.js:1:8]
1 │ ({ obj:20 } = 42)
· ──
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/223/input.js:1:9]
1 │ ({ get x() {} } = 0)
· ─────
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/224/input.js:2:4]
1 │ x
2 │ is y
· ▲
╰────
help: Try inserting a semicolon here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/225/input.js:2:6]
1 │ x
2 │ isnt y
· ▲
╰────
help: Try inserting a semicolon here
× Expected `Identifier` but found `default`
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/226/input.js:1:10]
1 │ function default() {}
· ───┬───
· ╰── `Identifier` expected
╰────
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/227/input.js:1:45]
1 │ function hello() {'use strict'; ({ i: 10, s(eval) { } }); }
· ────
╰────
note: This is strict mode code
× Identifier `t` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/228/input.js:1:35]
1 │ function a() { "use strict"; ({ b(t, t) { } }); }
· ┬ ┬
· │ ╰── It can not be redeclared here
· ╰── `t` has already been declared here
╰────
× Identifier expected. 'super' is a reserved word that cannot be used here.
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/229/input.js:1:5]
1 │ var super
· ─────
╰────
× Identifier expected. 'default' is a reserved word that cannot be used here.
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/230/input.js:1:5]
1 │ var default
· ───────
╰────
× Identifier expected. 'default' is a reserved word that cannot be used here.
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/231/input.js:1:5]
1 │ let default
· ───────
╰────
× Identifier expected. 'default' is a reserved word that cannot be used here.
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/232/input.js:1:7]
1 │ const default = 2
· ───────
╰────
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/233/input.js:1:21]
1 │ "use strict"; ({ v: eval } = obj)
· ────
╰────
note: This is strict mode code
× Cannot assign to 'arguments' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/234/input.js:1:21]
1 │ "use strict"; ({ v: arguments } = obj)
· ─────────
╰────
note: This is strict mode code
× for-in loop variable declaration may not have an initializer
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/235/input.js:1:6]
1 │ for (let x = 42 in list) process(x);
· ──────────
╰────
× for-of loop variable declaration may not have an initializer
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/236/input.js:1:6]
1 │ for (let x = 42 of list) process(x);
· ──────────
╰────
× Expected `from` but found `EOF`
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/237/input.js:1:11]
1 │ import foo
╰────
× Expected `from` but found `EOF`
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/238/input.js:1:20]
1 │ import { foo, bar }
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/239/input.js:1:17]
1 │ import foo from bar
· ───
╰────
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/242/input.js:1:16]
1 │ "use strict"; (eval = 10) => 42
· ────
╰────
note: This is strict mode code
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/243/input.js:1:15]
1 │ "use strict"; eval => 42
· ────
╰────
note: This is strict mode code
× Cannot assign to 'arguments' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/244/input.js:1:15]
1 │ "use strict"; arguments => 42
· ─────────
╰────
note: This is strict mode code
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/245/input.js:1:16]
1 │ "use strict"; (eval, a) => 42
· ────
╰────
note: This is strict mode code
× Cannot assign to 'arguments' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/246/input.js:1:16]
1 │ "use strict"; (arguments, a) => 42
· ─────────
╰────
note: This is strict mode code
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/247/input.js:1:16]
1 │ "use strict"; (eval, a = 10) => 42
· ────
╰────
note: This is strict mode code
× Identifier `a` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/248/input.js:1:16]
1 │ "use strict"; (a, a) => 42
· ┬ ┬
· │ ╰── It can not be redeclared here
· ╰── `a` has already been declared here
╰────
× '0'-prefixed octal literals and octal escape sequences are deprecated
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/249/input.js:1:22]
1 │ "use strict"; (a) => 00
· ──
╰────
help: for octal literals use the '0o' prefix instead
× Empty parenthesized expression
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/250/input.js:1:1]
1 │ () <= 42
· ──
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/251/input.js:1:5]
1 │ (10) => 00
· ▲
╰────
help: Try inserting a semicolon here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/252/input.js:1:9]
1 │ (10, 20) => 00
· ▲
╰────
help: Try inserting a semicolon here
× Expected `]` but found `,`
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/255/input.js:1:10]
1 │ void { [1, 2]: 3 };
· ┬
· ╰── `]` expected
╰────
× A 'yield' expression is only allowed in a generator body.
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/260/input.js:1:31]
1 │ (function() { "use strict"; f(yield v) })
· ─────
╰────
help: Either remove this `yield` or change the enclosing function to a generator function (`function*`)
× Expected `(` but found `**`
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/261/input.js:1:18]
1 │ var obj = { *test** }
· ─┬
· ╰── `(` expected
╰────
× Expected `{` but found `default`
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/263/input.js:1:7]
1 │ class default
· ───┬───
· ╰── `{` expected
╰────
× Unterminated string
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/264/input.js:1:1]
1 │ `test
· ─────
╰────
× Expected `(` but found `${}`
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/265/input.js:1:8]
1 │ switch `test`
· ───┬──
· ╰── `(` expected
╰────
× Expected `}` but found `EOF`
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/266/input.js:1:19]
1 │ `hello ${10 `test`
╰────
× Expected `}` but found `;`
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/267/input.js:1:12]
1 │ `hello ${10;test`
· ┬
· ╰── `}` expected
╰────
× Expected function body
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/268/input.js:1:1]
1 │ function a() 1 // expression closure is not supported
· ────────────
╰────
help: Add a function body (`{}`).
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/273/input.js:1:10]
1 │ var a = [if (x) x]
· ──
╰────
× Expected `:` but found `}`
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/275/input.js:1:13]
1 │ ({ "chance" }) = obj
· ┬
· ╰── `:` expected
╰────
× Expected `:` but found `}`
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/276/input.js:1:7]
1 │ ({ 42 }) = obj
· ┬
· ╰── `:` expected
╰────
× A rest parameter must be last in a parameter list
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/277/input.js:1:15]
1 │ function f(a, ...b, c) { }
· ────
╰────
× A rest parameter cannot have an initializer.
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/278/input.js:1:18]
1 │ function f(a, ...b = 0)
· ─────
╰────
× Expected function body
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/278/input.js:1:1]
1 │ function f(a, ...b = 0)
· ───────────────────────
╰────
help: Add a function body (`{}`).
× Identifier `a` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/280/input.js:1:26]
1 │ "use strict"; function x(a, { a }){}
· ┬ ┬
· │ ╰── It can not be redeclared here
· ╰── `a` has already been declared here
╰────
× Identifier `a` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/281/input.js:1:33]
1 │ "use strict"; function x({ b: { a } }, [{ b: { a } }]){}
· ┬ ┬
· │ ╰── It can not be redeclared here
· ╰── `a` has already been declared here
╰────
× A rest parameter must be last in a parameter list
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/283/input.js:1:2]
1 │ (...a, b) => {}
· ────
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/284/input.js:1:8]
1 │ ([ 5 ]) => {}
· ▲
╰────
help: Try inserting a semicolon here
× Expected `:` but found `}`
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/285/input.js:1:6]
1 │ ({ 5 }) => {}
· ┬
· ╰── `:` expected
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/286/input.js:1:2]
1 │ (...[ 5 ]) => {}
· ───
╰────
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/289/input.js:1:6]
1 │ ({ t(eval) { "use strict"; } });
· ────
╰────
note: This is strict mode code
× Bad escape sequence in untagged template literal
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/290/input.js:1:23]
1 │ "use strict"; `${test}\02`;
· ───
╰────
× Cannot use import statement outside a module
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/291/input.js:1:8]
1 │ if (1) import "acorn";
· ──────
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/293/input.js:1:7]
1 │ if (b,...a, );
· ───
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/294/input.js:1:5]
1 │ (b, ...a)
· ───
╰────
× Expected `}` but found `EOF`
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/295/input.js:2:1]
1 │ switch (cond) { case 10: let a = 20;
· ┬
· ╰── Opened here
╰────
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/296/input.js:1:16]
1 │ "use strict"; (eval) => 42
· ────
╰────
note: This is strict mode code
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/297/input.js:1:2]
1 │ (eval) => { "use strict"; 42 }
· ────
╰────
note: This is strict mode code
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/298/input.js:1:21]
1 │ ({ get test() { } }) => 42
· ▲
╰────
help: Try inserting a semicolon here
× Missing initializer in destructuring declaration
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/324/input.js:1:5]
1 │ let [x]
· ───
╰────
help: Add an initializer (e.g. ` = undefined`) here
× Missing initializer in destructuring declaration
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/325/input.js:1:5]
1 │ var [x]
· ───
╰────
help: Add an initializer (e.g. ` = undefined`) here
× Invalid Character `𖫵`
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/326/input.js:1:6]
1 │ var _𖫵 = 11;
· ─
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/326/input.js:1:6]
1 │ var _𖫵 = 11;
· ▲
╰────
help: Try inserting a semicolon here
× Invalid Character `𫠞`
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/327/input.js:1:5]
1 │ var 𫠞_ = 12;
· ──
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/328/input.js:1:11]
1 │ if (1) let x = 10;
· ▲
╰────
help: Try inserting a semicolon here
× Lexical declaration cannot appear in a single-statement context
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/329/input.js:1:10]
1 │ for (;;) const x = 10;
· ─────────────
╰────
help: Wrap this declaration in a block statement
× Invalid class declaration
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/331/input.js:1:15]
1 │ if (1) ; else class Cls {}
· ──────────
╰────
help: Classes can only be declared at top level or inside a block
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/332/input.js:1:19]
1 │ 'use strict'; [...eval] = arr
· ────
╰────
note: This is strict mode code
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/334/input.js:1:5]
1 │ [...eval] = arr
· ────
╰────
note: Modules are always strict mode code
× Cannot use `yield` as an identifier in a generator context
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/335/input.js:1:14]
1 │ function* y({yield}) {}
· ─────
╰────
× Bad escape sequence in untagged template literal
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/339/input.js:1:2]
1 │ `\07`
· ───
╰────
× Expected function body
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/340/input.js:1:13]
1 │ x = { method() 42 }
· ──
╰────
help: Add a function body (`{}`).
× Expected function body
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/341/input.js:1:17]
1 │ x = { get method() 42 }
· ──
╰────
help: Add a function body (`{}`).
× Expected function body
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/342/input.js:1:17]
1 │ x = { set method(val) v = val }
· ─────
╰────
help: Add a function body (`{}`).
× 'super' can only be used with function calls or in property accesses
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/344/input.js:1:1]
1 │ super
· ─────
╰────
help: Replace with `super()` or `super.prop` or `super[prop]`
× 'super' can only be referenced in members of derived classes or object literal expressions.
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/344/input.js:1:1]
1 │ super
· ─────
╰────
× A 'get' accessor must not have any formal parameters.
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/345/input.js:1:19]
1 │ class A { get prop(x) {} }
· ───
╰────
help: Remove these parameters here
× TS(1049): A 'set' accessor must have exactly one parameter.
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/346/input.js:1:19]
1 │ class A { set prop() {} }
· ──
╰────
help: Add a parameter here
× TS(1049): A 'set' accessor must have exactly one parameter.
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/347/input.js:1:19]
1 │ class A { set prop(x, y) {} }
· ──────
╰────
help: Remove parameters except the first one here
× Identifier `__proto__` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/349/input.js:1:4]
1 │ ({ '__proto__': 1, __proto__: 2 })
· ─────┬───── ────┬────
· │ ╰── It can not be redeclared here
· ╰── `__proto__` has already been declared here
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/357/input.js:1:7]
1 │ await = foo();
· ─
╰────
× Cannot use `await` as an identifier in an async context
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/359/input.js:1:7]
1 │ const await = foo();
· ─────
╰────
× The keyword 'await' is reserved
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/359/input.js:1:7]
1 │ const await = foo();
· ─────
╰────
note: The identifier `await` is reserved in module code
× Cannot use `await` as an identifier in an async context
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/361/input.js:1:9]
1 │ const { await } = foo();
· ─────
╰────
× The keyword 'await' is reserved
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/361/input.js:1:9]
1 │ const { await } = foo();
· ─────
╰────
note: The identifier `await` is reserved in module code
× The keyword 'await' is reserved
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/363/input.js:1:16]
1 │ function foo({ await }) {}
· ─────
╰────
note: The identifier `await` is reserved in module code
× Cannot use `await` as an identifier in an async context
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/365/input.js:1:10]
1 │ function await() {}
· ─────
╰────
× The keyword 'await' is reserved
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/365/input.js:1:10]
1 │ function await() {}
· ─────
╰────
note: The identifier `await` is reserved in module code
× Cannot use `await` as an identifier in an async context
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/367/input.js:1:7]
1 │ class await {}
· ─────
╰────
× The keyword 'await' is reserved
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/367/input.js:1:7]
1 │ class await {}
· ─────
╰────
note: The identifier `await` is reserved in module code
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/368/input.js:1:1]
1 │ enum = foo();
· ────
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/369/input.js:1:1]
1 │ enum = foo();
· ────
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/37/input.js:1:8]
1 │ ([a.a]) => 42
· ▲
╰────
help: Try inserting a semicolon here
× Identifier expected. 'enum' is a reserved word that cannot be used here.
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/370/input.js:1:7]
1 │ const enum = foo();
· ────
╰────
× Identifier expected. 'enum' is a reserved word that cannot be used here.
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/371/input.js:1:7]
1 │ const enum = foo();
· ────
╰────
× Expected `:` but found `}`
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/372/input.js:1:14]
1 │ const { enum } = foo();
· ┬
· ╰── `:` expected
╰────
× Expected `:` but found `}`
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/373/input.js:1:14]
1 │ const { enum } = foo();
· ┬
· ╰── `:` expected
╰────
× Expected `:` but found `}`
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/374/input.js:1:21]
1 │ function foo({ enum }) {}
· ┬
· ╰── `:` expected
╰────
× Expected `:` but found `}`
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/375/input.js:1:21]
1 │ function foo({ enum }) {}
· ┬
· ╰── `:` expected
╰────
× Expected `Identifier` but found `enum`
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/376/input.js:1:10]
1 │ function enum() {}
· ──┬─
· ╰── `Identifier` expected
╰────
× Expected `Identifier` but found `enum`
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/377/input.js:1:10]
1 │ function enum() {}
· ──┬─
· ╰── `Identifier` expected
╰────
× Expected `{` but found `enum`
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/378/input.js:1:7]
1 │ class enum {}
· ──┬─
· ╰── `{` expected
╰────
× Expected `{` but found `enum`
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/379/input.js:1:7]
1 │ class enum {}
· ──┬─
· ╰── `{` expected
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/386/input.js:1:8]
1 │ export typeof foo;
· ──────
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/387/input.js:1:8]
1 │ export new Foo();
· ───
╰────
× Expected function name
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/388/input.js:1:16]
1 │ export function() {};
· ─
╰────
help: Function name is required in function declaration or named export
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/389/input.js:1:8]
1 │ export for (;;);
· ───
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/390/input.js:1:8]
1 │ export while(foo);
· ─────
╰────
× Expected `,` or `}` but found `:`
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/392/input.js:1:18]
1 │ import foo, { bar: { a } } from 'my-module';
· ┬ ┬
· │ ╰── `,` or `}` expected
· ╰── Opened here
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/395/input.js:1:8]
1 │ ([a.a]) => 42
· ▲
╰────
help: Try inserting a semicolon here
× Expected `from` but found `EOF`
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/84/input.js:1:9]
1 │ export *
╰────
× Expected `from` but found `default`
╭─[babel/packages/babel-parser/test/fixtures/es2015/uncategorised/96/input.js:1:8]
1 │ import default from "foo"
· ───┬───
· ╰── `from` expected
╰────
× Cannot use `yield` as an identifier in a generator context
╭─[babel/packages/babel-parser/test/fixtures/es2015/yield/function-name-function-declaration-inside-generator/input.js:2:12]
1 │ function* fn() {
2 │ function yield() {}
· ─────
3 │ }
╰────
× Cannot use `yield` as an identifier in a generator context
╭─[babel/packages/babel-parser/test/fixtures/es2015/yield/function-name-generator-expression/input.js:1:12]
1 │ +function* yield() {}
· ─────
╰────
× The keyword 'yield' is reserved
╭─[babel/packages/babel-parser/test/fixtures/es2015/yield/function-name-strict/input.js:2:10]
1 │ "use strict";
2 │ function yield() {}
· ─────
╰────
note: This identifier is reserved in strict mode code
× The keyword 'yield' is reserved
╭─[babel/packages/babel-parser/test/fixtures/es2015/yield/function-name-strict-body/input.js:1:10]
1 │ function yield() { "use strict"; }
· ─────
╰────
note: This identifier is reserved in strict mode code
× Expected `{` but found `Identifier`
╭─[babel/packages/babel-parser/test/fixtures/es2015/yield/in-class-heritage/input.js:1:23]
1 │ class A extends yield B { }
· ┬
· ╰── `{` expected
╰────
× A 'yield' expression is only allowed in a generator body.
╭─[babel/packages/babel-parser/test/fixtures/es2015/yield/in-global-scope/input.js:1:1]
1 │ yield 10
· ─────
╰────
help: Either remove this `yield` or change the enclosing function to a generator function (`function*`)
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/es2015/yield/in-iterator-stmt/input.js:2:8]
1 │ function* g() {
2 │ for (yield '' in {}; ; ) ;
· ────────
3 │ }
╰────
× A 'yield' expression is only allowed in a generator body.
╭─[babel/packages/babel-parser/test/fixtures/es2015/yield/in-plain-function/input.js:1:16]
1 │ (function () { yield 10 })
· ─────
╰────
help: Either remove this `yield` or change the enclosing function to a generator function (`function*`)
× yield expression not allowed in formal parameter
╭─[babel/packages/babel-parser/test/fixtures/es2015/yield/parameter-default-inside-arrow-inside-generator-1/input.js:2:8]
1 │ function* fn() {
2 │ (x = yield) => {};
· ──┬──
· ╰── yield expression not allowed in formal parameter
3 │ }
╰────
× yield expression not allowed in formal parameter
╭─[babel/packages/babel-parser/test/fixtures/es2015/yield/parameter-default-inside-arrow-inside-generator-2/input.js:2:16]
1 │ function* fn() {
2 │ (x = 3 + a.b(yield) ** 2) => {};
· ──┬──
· ╰── yield expression not allowed in formal parameter
3 │ }
╰────
× yield expression not allowed in formal parameter
╭─[babel/packages/babel-parser/test/fixtures/es2015/yield/parameter-default-inside-arrow-inside-generator-3/input.js:2:8]
1 │ function* fn() {
2 │ (x = yield fn) => {};
· ────┬───
· ╰── yield expression not allowed in formal parameter
3 │ }
╰────
× yield expression not allowed in formal parameter
╭─[babel/packages/babel-parser/test/fixtures/es2015/yield/parameter-default-inside-arrow-inside-generator-4/input.js:2:18]
1 │ function* fn() {
2 │ (a, b = 3, x = yield) => {};
· ──┬──
· ╰── yield expression not allowed in formal parameter
3 │ }
╰────
× Cannot use `yield` as an identifier in a generator context
╭─[babel/packages/babel-parser/test/fixtures/es2015/yield/parameter-default-inside-arrow-inside-generator-5/input.js:2:9]
1 │ function* fn() {
2 │ (x = (yield) => {}) => {};
· ─────
3 │ }
╰────
× yield expression not allowed in formal parameter
╭─[babel/packages/babel-parser/test/fixtures/es2015/yield/parameter-default-inside-arrow-inside-generator-6/input.js:2:9]
1 │ function* fn() {
2 │ (x = (yield)) => {};
· ──┬──
· ╰── yield expression not allowed in formal parameter
3 │ }
╰────
× yield expression not allowed in formal parameter
╭─[babel/packages/babel-parser/test/fixtures/es2015/yield/parameter-default-inside-generator/input.js:1:18]
1 │ function* fn(x = yield) {}
· ──┬──
· ╰── yield expression not allowed in formal parameter
╰────
× yield expression not allowed in formal parameter
╭─[babel/packages/babel-parser/test/fixtures/es2015/yield/parameter-default-inside-generator-method/input.js:1:16]
1 │ ({ *method(x = yield) {} })
· ──┬──
· ╰── yield expression not allowed in formal parameter
╰────
× The keyword 'yield' is reserved
╭─[babel/packages/babel-parser/test/fixtures/es2015/yield/parameter-default-strict/input.js:2:17]
1 │ "use strict";
2 │ function fn(x = yield) {}
· ─────
╰────
note: This identifier is reserved in strict mode code
× Cannot use `yield` as an identifier in a generator context
╭─[babel/packages/babel-parser/test/fixtures/es2015/yield/parameter-name-arrow-inside-generator-1/input.js:2:4]
1 │ function* fn() {
2 │ (yield) => {};
· ─────
3 │ }
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2015/yield/parameter-name-arrow-inside-generator-2/input.js:2:13]
1 │ function* fn() {
2 │ (yield fn) => {};
· ▲
3 │ }
╰────
help: Try inserting a semicolon here
× Cannot use `yield` as an identifier in a generator context
╭─[babel/packages/babel-parser/test/fixtures/es2015/yield/parameter-name-arrow-inside-generator-3/input.js:2:10]
1 │ function* fn() {
2 │ (a, b, yield) => {};
· ─────
3 │ }
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/es2015/yield/parameter-name-arrow-no-parens-inside-generator/input.js:2:9]
1 │ function* fn() {
2 │ yield => {};
· ──
3 │ }
╰────
× Cannot use `yield` as an identifier in a generator context
╭─[babel/packages/babel-parser/test/fixtures/es2015/yield/parameter-name-generator/input.js:1:14]
1 │ function* fn(yield) {}
· ─────
╰────
× Cannot use `yield` as an identifier in a generator context
╭─[babel/packages/babel-parser/test/fixtures/es2015/yield/parameter-name-generator-method/input.js:1:12]
1 │ ({ *method(yield) {} });
· ─────
╰────
× The keyword 'yield' is reserved
╭─[babel/packages/babel-parser/test/fixtures/es2015/yield/parameter-name-strict/input.js:2:13]
1 │ "use strict";
2 │ function fn(yield) {}
· ─────
╰────
note: This identifier is reserved in strict mode code
× The keyword 'yield' is reserved
╭─[babel/packages/babel-parser/test/fixtures/es2015/yield/parameter-name-strict-body/input.js:1:13]
1 │ function fn(yield) { "use strict"; }
· ─────
╰────
note: This identifier is reserved in strict mode code
× yield expression not allowed in formal parameter
╭─[babel/packages/babel-parser/test/fixtures/es2015/yield/yield-star-parameter-default-inside-generator/input.js:1:25]
1 │ function* fn(x = yield* yield) {}
· ──┬──
· ╰── yield expression not allowed in formal parameter
╰────
× yield expression not allowed in formal parameter
╭─[babel/packages/babel-parser/test/fixtures/es2015/yield/yield-star-parameter-default-inside-generator/input.js:1:18]
1 │ function* fn(x = yield* yield) {}
· ──────┬─────
· ╰── yield expression not allowed in formal parameter
╰────
× A unary expression with the '-' operator cannot be used as the left operand of an exponentiation expression
╭─[babel/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/10/input.js:1:1]
1 │ -5 ** 6;
· ──
╰────
help: Wrap the unary expression in parentheses to make the precedence explicit
× A unary expression with the '-' operator cannot be used as the left operand of an exponentiation expression
╭─[babel/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/11/input.js:1:1]
1 │ -(5) ** 6;
· ────
╰────
help: Wrap the unary expression in parentheses to make the precedence explicit
× A unary expression with the '-' operator cannot be used as the left operand of an exponentiation expression
╭─[babel/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/12/input.js:1:2]
1 │ (-5 ** 6);
· ──
╰────
help: Wrap the unary expression in parentheses to make the precedence explicit
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/13/input.js:1:4]
1 │ 1 %* 1;
· ─
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/14/input.js:1:4]
1 │ a %*= 1;
· ──
╰────
× A unary expression with the '-' operator cannot be used as the left operand of an exponentiation expression
╭─[babel/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/15/input.js:1:1]
1 │ -(5) ** 6;
· ────
╰────
help: Wrap the unary expression in parentheses to make the precedence explicit
× A unary expression with the '-' operator cannot be used as the left operand of an exponentiation expression
╭─[babel/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/16/input.js:1:2]
1 │ (-5 ** 6);
· ──
╰────
help: Wrap the unary expression in parentheses to make the precedence explicit
× A unary expression with the 'await' operator cannot be used as the left operand of an exponentiation expression
╭─[babel/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/await-before-exponential/input.js:1:13]
1 │ async () => await 5 ** 6;
· ───────
╰────
help: Wrap the unary expression in parentheses to make the precedence explicit
× A unary expression with the 'await' operator cannot be used as the left operand of an exponentiation expression
╭─[babel/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/await-unary-before-exponential/input.js:1:13]
1 │ async () => await -5 ** 6;
· ────────
╰────
help: Wrap the unary expression in parentheses to make the precedence explicit
× A unary expression with the '-' operator cannot be used as the left operand of an exponentiation expression
╭─[babel/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/nested-unary-before-exponential/input.js:1:2]
1 │ (-+5 ** 6);
· ───
╰────
help: Wrap the unary expression in parentheses to make the precedence explicit
× Illegal 'use strict' directive in function with non-simple parameter list
╭─[babel/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/array-pattern/input.js:2:3]
1 │ function a([ option1, option2 ]) {
2 │ "use strict";
· ─────────────
3 │ }
╰────
help: Wrap this function with an IIFE with a 'use strict' directive that returns this function
× Illegal 'use strict' directive in function with non-simple parameter list
╭─[babel/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/array-pattern-default/input.js:2:3]
1 │ function a([ option1, option2 ] = []) {
2 │ "use strict";
· ─────────────
3 │ }
╰────
help: Wrap this function with an IIFE with a 'use strict' directive that returns this function
× Illegal 'use strict' directive in function with non-simple parameter list
╭─[babel/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/arrow-function/input.js:2:3]
1 │ var a = (options = {}) => {
2 │ "use strict";
· ─────────────
3 │ };
╰────
help: Wrap this function with an IIFE with a 'use strict' directive that returns this function
× Illegal 'use strict' directive in function with non-simple parameter list
╭─[babel/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/async-arrow-function/input.js:2:3]
1 │ var a = async (options = {}) => {
2 │ "use strict";
· ─────────────
3 │ };
╰────
help: Wrap this function with an IIFE with a 'use strict' directive that returns this function
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/async-arrow-function-after-binary-operator/input.js:1:12]
1 │ 3 + async() => 2
· ▲
╰────
help: Try inserting a semicolon here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/async-arrow-function-after-unary-operator/input.js:1:16]
1 │ delete async () => 3;
· ▲
╰────
help: Try inserting a semicolon here
× Illegal 'use strict' directive in function with non-simple parameter list
╭─[babel/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/async-function/input.js:2:3]
1 │ async function a(options = {}) {
2 │ "use strict";
· ─────────────
3 │ }
╰────
help: Wrap this function with an IIFE with a 'use strict' directive that returns this function
× Illegal 'use strict' directive in function with non-simple parameter list
╭─[babel/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/default/input.js:2:3]
1 │ function a(options = {}) {
2 │ "use strict";
· ─────────────
3 │ }
╰────
help: Wrap this function with an IIFE with a 'use strict' directive that returns this function
× Illegal 'use strict' directive in function with non-simple parameter list
╭─[babel/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/generator-function/input.js:2:3]
1 │ function* a(options = {}) {
2 │ "use strict";
· ─────────────
3 │ }
╰────
help: Wrap this function with an IIFE with a 'use strict' directive that returns this function
× Illegal 'use strict' directive in function with non-simple parameter list
╭─[babel/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/generator-method/input.js:3:5]
2 │ * a(options = {}) {
3 │ "use strict";
· ─────────────
4 │ }
╰────
help: Wrap this function with an IIFE with a 'use strict' directive that returns this function
× Illegal 'use strict' directive in function with non-simple parameter list
╭─[babel/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/method/input.js:3:5]
2 │ a(options = {}) {
3 │ "use strict";
· ─────────────
4 │ }
╰────
help: Wrap this function with an IIFE with a 'use strict' directive that returns this function
× Illegal 'use strict' directive in function with non-simple parameter list
╭─[babel/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/object-pattern/input.js:2:3]
1 │ function a({ option1, option2 }) {
2 │ "use strict";
· ─────────────
3 │ }
╰────
help: Wrap this function with an IIFE with a 'use strict' directive that returns this function
× Illegal 'use strict' directive in function with non-simple parameter list
╭─[babel/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/object-pattern-default/input.js:2:3]
1 │ function a({ option1, option2 } = {}) {
2 │ "use strict";
· ─────────────
3 │ }
╰────
help: Wrap this function with an IIFE with a 'use strict' directive that returns this function
× Illegal 'use strict' directive in function with non-simple parameter list
╭─[babel/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/rest/input.js:2:3]
1 │ function a(...options) {
2 │ "use strict";
· ─────────────
3 │ }
╰────
help: Wrap this function with an IIFE with a 'use strict' directive that returns this function
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-arrow/invalid-parens-binary-argument/input.js:1:17]
1 │ true || async () => {}
· ▲
╰────
help: Try inserting a semicolon here
× Expected `{` but found `=>`
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-arrow/invalid-parens-class-heritage/input.js:1:26]
1 │ class C extends async () => {} {}
· ─┬
· ╰── `{` expected
╰────
× Expected `,` or `)` but found `=>`
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-arrow/invalid-parens-unary-argument/input.js:1:29]
1 │ console.log(typeof async () => {});
· ┬ ─┬
· │ ╰── `,` or `)` expected
· ╰── Opened here
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-arrow/invalid-single-binding-binary-argument/input.js:1:14]
1 │ true || async x => {}
· ▲
╰────
help: Try inserting a semicolon here
× Expected `{` but found `Identifier`
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-arrow/invalid-single-binding-class-heritage/input.js:1:23]
1 │ class C extends async x => {} {}
· ┬
· ╰── `{` expected
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-arrow/invalid-single-binding-unary-argument/input.js:1:13]
1 │ typeof async x => {}
· ▲
╰────
help: Try inserting a semicolon here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-arrow/parenthesized-array-pattern-nested/input.js:1:28]
1 │ async ([ [(a)] = [] ] = []) => {};
· ▲
╰────
help: Try inserting a semicolon here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-arrow/parenthesized-array-pattern-nested-2/input.js:1:24]
1 │ async ([(a) = []] = []) => {}
· ▲
╰────
help: Try inserting a semicolon here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-arrow/parenthesized-binding-identifier/input.js:1:24]
1 │ var foo = async ((foo)) => {};
· ▲
╰────
help: Try inserting a semicolon here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-arrow/parenthesized-binding-member-expression/input.js:1:26]
1 │ async ([(a.b) = []] = []) => {}
· ▲
╰────
help: Try inserting a semicolon here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-arrow/parenthesized-binding-pattern/input.js:1:26]
1 │ var foo = async ([(foo)]) => {};
· ▲
╰────
help: Try inserting a semicolon here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-arrow/parenthesized-rest-array/input.js:1:29]
1 │ var foo = async ([...(foo)]) => {};
· ▲
╰────
help: Try inserting a semicolon here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-arrow/parenthesized-rest-object/input.js:1:29]
1 │ var foo = async ({...(foo)}) => {};
· ▲
╰────
help: Try inserting a semicolon here
× Identifier `__proto__` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-call/parenthesized-argument-object-double-proto/input.js:1:9]
1 │ async({ __proto__: x, __proto__: y })
· ────┬──── ────┬────
· │ ╰── It can not be redeclared here
· ╰── `__proto__` has already been declared here
╰────
× Invalid assignment in object literal
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-call/parenthesized-argument-object-with-assignment/input.js:1:9]
1 │ async({ foo33 = 1 });
· ─────────
╰────
help: Did you mean to use a ':'? An '=' can only follow a property name when the containing object literal is part of a destructuring pattern.
× Expected `,` or `)` but found `?`
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-call/with-optional-operator/input.js:1:8]
1 │ async(x?)
· ┬ ┬
· │ ╰── `,` or `)` expected
· ╰── Opened here
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/10/input.js:2:4]
1 │ var x = async
2 │ (x) => x + 1;
· ▲
╰────
help: Try inserting a semicolon here
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/2/input.js:2:8]
1 │ async function bar() {
2 │ await* foo();
· ─
3 │ }
╰────
× Invalid assignment in object literal
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/35/input.js:1:15]
1 │ const foo = { async = true };
· ────────────
╰────
help: Did you mean to use a ':'? An '=' can only follow a property name when the containing object literal is part of a destructuring pattern.
× Invalid assignment in object literal
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/36/input.js:1:16]
1 │ const foo = ({ async = true });
· ────────────
╰────
help: Did you mean to use a ':'? An '=' can only follow a property name when the containing object literal is part of a destructuring pattern.
× 'async' modifier cannot be used here.
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/4/input.js:1:4]
1 │ ({ async a });
· ─────
╰────
help: No modifiers are allowed here.
× 'async' modifier cannot be used here.
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/5/input.js:1:4]
1 │ ({ async a: function () {} });
· ─────
╰────
help: No modifiers are allowed here.
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/6/input.js:1:15]
1 │ async () => {}()
· ▲
╰────
help: Try inserting a semicolon here
× `await` is only allowed within async functions and at the top levels of modules
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/9/input.js:1:25]
1 │ function foo(promise) { await promise; }
· ─────
╰────
help: Either remove this `await` or add the `async` keyword to the enclosing function
× `await` is only allowed within async functions and at the top levels of modules
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/allow-await-outside-function-throw/input.js:2:10]
1 │ function a() {
2 │ return await 1
· ─────
3 │ }
╰────
help: Either remove this `await` or add the `async` keyword to the enclosing function
× Cannot use `await` as an identifier in an async context
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/async-await-as-arrow-binding-identifier/input.js:1:7]
1 │ async await => {}
· ─────
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/async-function-and-non-bmp-character/input.js:1:6]
1 │ async function𝐬 f() {}
· ▲
╰────
help: Try inserting a semicolon here
× Cannot use `await` as an identifier in an async context
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/await-async-function-expression-name/input.js:1:17]
1 │ (async function await() {});
· ─────
╰────
× Cannot use `await` as an identifier in an async context
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/await-binding-inside-arrow-params-inside-async-arrow-params/input.js:1:15]
1 │ async (a = ({ await }) => {}) => {};
· ─────
╰────
× Cannot use `await` as an identifier in an async context
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/await-function-declaration-name-inside-async-function/input.js:2:12]
1 │ async function foo() {
2 │ function await() {}
· ─────
3 │ }
╰────
× await expression not allowed in formal parameter
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/await-inside-arguments-of-async-call-inside-parameters-of-async-arrow-function/input.js:2:24]
1 │ async function fn() {
2 │ async (x = async(y = await 2)) => {};
· ───┬───
· ╰── await expression not allowed in formal parameter
3 │ }
╰────
× `await` is only allowed within async functions and at the top levels of modules
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/await-inside-arrow-expression-disallowed/input.js:1:9]
1 │ () => { await x }
· ─────
╰────
help: Either remove this `await` or add the `async` keyword to the enclosing function
× await expression not allowed in formal parameter
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/await-inside-parameters/input.js:1:23]
1 │ async function fn(x = await 2) {}
· ───┬───
· ╰── await expression not allowed in formal parameter
╰────
× await expression not allowed in formal parameter
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/await-inside-parameters-of-async-arrow-function/input.js:1:12]
1 │ async (x = await 2) => {};
· ───┬───
· ╰── await expression not allowed in formal parameter
╰────
× await expression not allowed in formal parameter
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/await-inside-parameters-of-nested-arrow-function/input.js:2:8]
1 │ async function fn() {
2 │ (x = await 2) => {};
· ───┬───
· ╰── await expression not allowed in formal parameter
3 │ }
╰────
× await expression not allowed in formal parameter
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/await-inside-parameters-of-nested-async-arrow-function/input.js:2:14]
1 │ async function fn() {
2 │ async (x = await 2) => {};
· ───┬───
· ╰── await expression not allowed in formal parameter
3 │ }
╰────
× `await` is only allowed within async functions and at the top levels of modules
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/await-inside-parameters-of-nested-function/input.js:2:20]
1 │ async function foo() {
2 │ function bar(x = await 2) {}
· ─────
3 │ }
╰────
help: Either remove this `await` or add the `async` keyword to the enclosing function
× await expression not allowed in formal parameter
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/await-inside-parameters-of-nested-function/input.js:2:20]
1 │ async function foo() {
2 │ function bar(x = await 2) {}
· ───┬───
· ╰── await expression not allowed in formal parameter
3 │ }
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/export-async/input.js:1:8]
1 │ export async;
· ─────
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/export-invalid/input.js:1:21]
1 │ export default async functionX () {}
· ▲
╰────
help: Try inserting a semicolon here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-await-with-object-exp-in-function/input.js:2:8]
1 │ function foo() {
2 │ await { foo };
· ▲
3 │ }
╰────
help: Try inserting a semicolon here
× Keywords cannot contain escape characters
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-async-class-method/input.js:1:11]
1 │ class X { \u0061sync x() { await x } }
· ──────────
╰────
× Keywords cannot contain escape characters
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-async-obj-method/input.js:1:4]
1 │ ({ \u0061sync x() { await x } })
· ──────────
╰────
× Keywords cannot contain escape characters
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-async-static-class-method/input.js:1:18]
1 │ class X { static \u0061sync x() { await x } }
· ──────────
╰────
× Keywords cannot contain escape characters
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-await/input.js:1:21]
1 │ (async function() { aw\u0061it x })
· ──────────
╰────
× Keywords cannot contain escape characters
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-export-async-function/input.js:1:8]
1 │ export \u0061sync function y() { await x }
· ──────────
╰────
× Cannot use export statement outside a module
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-export-async-function/input.js:1:1]
1 │ export \u0061sync function y() { await x }
· ──────
╰────
× Keywords cannot contain escape characters
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-export-dflt-async-function/input.js:1:16]
1 │ export default \u0061sync function y() { await x }
· ──────────
╰────
× Keywords cannot contain escape characters
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-sequence-arrow/input.js:1:1]
1 │ \u0061sync x => { await x }
· ──────────
╰────
× Keywords cannot contain escape characters
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-sequence-arrow-list/input.js:1:2]
1 │ (\u0061sync x => { await x })
· ──────────
╰────
× Keywords cannot contain escape characters
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-sequence-function/input.js:1:1]
1 │ \u0061sync function() { await x }
· ──────────
╰────
× Expected function name
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-sequence-function/input.js:1:20]
1 │ \u0061sync function() { await x }
· ─
╰────
help: Function name is required in function declaration or named export
× Keywords cannot contain escape characters
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-sequence-function-list/input.js:1:2]
1 │ (\u0061sync function() { await x })
· ──────────
╰────
× Keywords cannot contain escape characters
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-for-await-expression-init/input.js:1:12]
1 │ for (await o\u0066 [0];;);
· ───────
╰────
× Expected `)` but found `;`
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-for-await-expression-init/input.js:1:23]
1 │ for (await o\u0066 [0];;);
· ┬ ┬
· │ ╰── `)` expected
· ╰── Opened here
╰────
× Async functions can only be declared at the top level or inside a block
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-generator-inside-loop/input.js:1:11]
1 │ while (1) async function *foo(){}
· ─────────────────────
╰────
× Invalid function declaration
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-generator-inside-loop/input.js:1:11]
1 │ while (1) async function *foo(){}
· ───────────────────────
╰────
help: In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement
× Async functions can only be declared at the top level or inside a block
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-inside-loop/input.js:1:11]
1 │ while (1) async function foo(){}
· ────────────────────
╰────
× Invalid function declaration
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-inside-loop/input.js:1:11]
1 │ while (1) async function foo(){}
· ──────────────────────
╰────
help: In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement
× Line terminator not permitted before arrow
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-newline-after-params/input.js:2:1]
1 │ async (x)
2 │ => {}
· ──
╰────
help: Remove the line break before here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-parens-async-arrow/input.js:1:11]
1 │ (async)(a) => {}
· ▲
╰────
help: Try inserting a semicolon here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-parens-async-func/input.js:1:8]
1 │ (async) function x (a) {}
· ▲
╰────
help: Try inserting a semicolon here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/multiple-await-in-async-arrow-params/input.js:1:41]
1 │ async ({ x = [ await ], y = { await } }) => {}
· ▲
╰────
help: Try inserting a semicolon here
× Invalid assignment in object literal
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/multiple-await-in-async-arrow-params/input.js:1:10]
1 │ async ({ x = [ await ], y = { await } }) => {}
· ─────────────
╰────
help: Did you mean to use a ':'? An '=' can only follow a property name when the containing object literal is part of a destructuring pattern.
× Invalid assignment in object literal
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/multiple-await-in-async-arrow-params/input.js:1:25]
1 │ async ({ x = [ await ], y = { await } }) => {}
· ─────────────
╰────
help: Did you mean to use a ':'? An '=' can only follow a property name when the containing object literal is part of a destructuring pattern.
× Line terminator not permitted before arrow
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/newline-before-arrow/input.js:2:1]
1 │ async x
2 │ => x
· ──
╰────
help: Remove the line break before here
× Constructor can't be an async method
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/no-constructor/input.js:2:9]
1 │ class A {
2 │ async constructor() {}
· ───────────
3 │ }
╰────
× A rest parameter or binding pattern may not have a trailing comma.
╭─[babel/packages/babel-parser/test/fixtures/es2017/async-functions/params-invalid-rest-trailing-comma/input.js:1:12]
1 │ async (...a,) => {};
· ─
╰────
help: Remove the trailing comma here
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/es2017/trailing-function-commas/5/input.js:1:5]
1 │ log(,);
· ─
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/es2017/trailing-function-commas/6/input.js:1:14]
1 │ function log(,) { }
· ─
╰────
× Parenthesized expressions may not have a trailing comma.
╭─[babel/packages/babel-parser/test/fixtures/es2017/trailing-function-commas/7/input.js:1:7]
1 │ ('foo',)
· ─
╰────
help: Remove the trailing comma here
× `for await` loops are only allowed within async functions and at the top levels of modules
╭─[babel/packages/babel-parser/test/fixtures/es2018/async-generators/for-await-async-context/input.js:2:7]
1 │ function f() {
2 │ for await (let x of y);
· ─────
3 │ }
╰────
help: Either remove this `await` or add the `async` keyword to the enclosing function
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/es2018/async-generators/for-await-async-of-arrow/input.js:2:14]
1 │ async function f() {
2 │ for await (async of => {} of x);
· ──────────────
3 │ }
╰────
× await can only be used in conjunction with `for...of` statements
╭─[babel/packages/babel-parser/test/fixtures/es2018/async-generators/for-await-async-of-arrow-semicolon/input.js:2:3]
1 │ async function f() {
2 │ for await (async of => {};;);
· ────────────────────────────
3 │ }
╰────
help: Did you mean to use a for...of statement?
× await can only be used in conjunction with `for...of` statements
╭─[babel/packages/babel-parser/test/fixtures/es2018/async-generators/for-await-no-in/input.js:2:3]
1 │ async function f() {
2 │ for await (let x in y);
· ──────────────────────
3 │ }
╰────
help: Did you mean to use a for...of statement?
× await can only be used in conjunction with `for...of` statements
╭─[babel/packages/babel-parser/test/fixtures/es2018/async-generators/for-await-no-semi-1/input.js:2:3]
1 │ async function f() {
2 │ for await (;false;);
· ───────────────────
3 │ }
╰────
help: Did you mean to use a for...of statement?
× await can only be used in conjunction with `for...of` statements
╭─[babel/packages/babel-parser/test/fixtures/es2018/async-generators/for-await-no-semi-2/input.js:2:3]
1 │ async function f() {
2 │ for await (let i = 0;false;);
· ────────────────────────────
3 │ }
╰────
help: Did you mean to use a for...of statement?
× await can only be used in conjunction with `for...of` statements
╭─[babel/packages/babel-parser/test/fixtures/es2018/async-generators/for-await-no-semi-3/input.js:2:3]
1 │ async function f() {
2 │ for await (x = 0;false;);
· ────────────────────────
3 │ }
╰────
help: Did you mean to use a for...of statement?
× Duplicated export 'foo'
╭─[babel/packages/babel-parser/test/fixtures/es2018/object-rest-spread/11/input.js:1:14]
1 │ export const foo = 1;
· ─┬─
· ╰── Export has already been declared here
2 │ export const { bar, ...foo } = baz;
· ─┬─
· ╰── It cannot be redeclared here
╰────
× Identifier `foo` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2018/object-rest-spread/11/input.js:1:14]
1 │ export const foo = 1;
· ─┬─
· ╰── `foo` has already been declared here
2 │ export const { bar, ...foo } = baz;
· ─┬─
· ╰── It can not be redeclared here
╰────
× Duplicated export 'bar'
╭─[babel/packages/babel-parser/test/fixtures/es2018/object-rest-spread/12/input.js:1:24]
1 │ export const { foo, ...bar } = baz;
· ─┬─
· ╰── Export has already been declared here
2 │ export const bar = 1;
· ─┬─
· ╰── It cannot be redeclared here
╰────
× Identifier `bar` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2018/object-rest-spread/12/input.js:1:24]
1 │ export const { foo, ...bar } = baz;
· ─┬─
· ╰── `bar` has already been declared here
2 │ export const bar = 1;
· ─┬─
· ╰── It can not be redeclared here
╰────
× Duplicated export 'foo'
╭─[babel/packages/babel-parser/test/fixtures/es2018/object-rest-spread/13/input.js:1:14]
1 │ export const foo = 1;
· ─┬─
· ╰── Export has already been declared here
2 │ export const { bar: { baz, ...foo } } = qux;
· ─┬─
· ╰── It cannot be redeclared here
╰────
× Identifier `foo` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2018/object-rest-spread/13/input.js:1:14]
1 │ export const foo = 1;
· ─┬─
· ╰── `foo` has already been declared here
2 │ export const { bar: { baz, ...foo } } = qux;
· ─┬─
· ╰── It can not be redeclared here
╰────
× Duplicated export 'foo'
╭─[babel/packages/babel-parser/test/fixtures/es2018/object-rest-spread/14/input.js:1:14]
1 │ export const foo = 1;
· ─┬─
· ╰── Export has already been declared here
2 │ export const [bar, { baz, ...foo }] = qux;
· ─┬─
· ╰── It cannot be redeclared here
╰────
× Identifier `foo` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2018/object-rest-spread/14/input.js:1:14]
1 │ export const foo = 1;
· ─┬─
· ╰── `foo` has already been declared here
2 │ export const [bar, { baz, ...foo }] = qux;
· ─┬─
· ╰── It can not be redeclared here
╰────
× Duplicated export 'foo'
╭─[babel/packages/babel-parser/test/fixtures/es2018/object-rest-spread/15/input.js:1:14]
1 │ export const foo = 1;
· ─┬─
· ╰── Export has already been declared here
2 │ export const [bar, [{ baz, ...foo }]] = qux;
· ─┬─
· ╰── It cannot be redeclared here
╰────
× Identifier `foo` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2018/object-rest-spread/15/input.js:1:14]
1 │ export const foo = 1;
· ─┬─
· ╰── `foo` has already been declared here
2 │ export const [bar, [{ baz, ...foo }]] = qux;
· ─┬─
· ╰── It can not be redeclared here
╰────
× Invalid rest element target in destructuring pattern
╭─[babel/packages/babel-parser/test/fixtures/es2018/object-rest-spread/16/input.js:1:9]
1 │ var {...{z}} = { z: 1};
· ───
╰────
help: Expected an identifier, like `...rest`.
× Invalid rest element target in destructuring pattern
╭─[babel/packages/babel-parser/test/fixtures/es2018/object-rest-spread/17/input.js:1:10]
1 │ var { ...{ x = 5 } } = {x : 1};
· ─────────
╰────
help: Expected an identifier, like `...rest`.
× Invalid rest element target in destructuring pattern
╭─[babel/packages/babel-parser/test/fixtures/es2018/object-rest-spread/19/input.js:1:19]
1 │ function test({...{}}) {}
· ──
╰────
help: Expected an identifier, like `...rest`.
× Invalid rest element target in destructuring pattern
╭─[babel/packages/babel-parser/test/fixtures/es2018/object-rest-spread/20/input.js:1:19]
1 │ function test({...{a}}) {}
· ───
╰────
help: Expected an identifier, like `...rest`.
× Invalid rest element target in destructuring assignment
╭─[babel/packages/babel-parser/test/fixtures/es2018/object-rest-spread/21/input.js:1:6]
1 │ ({...x = 1} = {})
· ─────
╰────
help: Expected an identifier or member expression, like `...rest` or `...obj.prop`.
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/es2018/object-rest-spread/21/input.js:1:6]
1 │ ({...x = 1} = {})
· ─────
╰────
× A rest element cannot have an initializer.
╭─[babel/packages/babel-parser/test/fixtures/es2018/object-rest-spread/22/input.js:1:9]
1 │ var {...x = 1} = {}
· ─────
╰────
× Invalid rest element target in destructuring pattern
╭─[babel/packages/babel-parser/test/fixtures/es2018/object-rest-spread/22/input.js:1:9]
1 │ var {...x = 1} = {}
· ─────
╰────
help: Expected an identifier, like `...rest`.
× A rest element cannot have an initializer.
╭─[babel/packages/babel-parser/test/fixtures/es2018/object-rest-spread/23/input.js:1:19]
1 │ function test({...x = 1}) {}
· ─────
╰────
× Invalid rest element target in destructuring pattern
╭─[babel/packages/babel-parser/test/fixtures/es2018/object-rest-spread/23/input.js:1:19]
1 │ function test({...x = 1}) {}
· ─────
╰────
help: Expected an identifier, like `...rest`.
× Invalid rest element target in destructuring assignment
╭─[babel/packages/babel-parser/test/fixtures/es2018/object-rest-spread/24/input.js:1:6]
1 │ ({...[]} = {})
· ──
╰────
help: Expected an identifier or member expression, like `...rest` or `...obj.prop`.
× Invalid rest element target in destructuring pattern
╭─[babel/packages/babel-parser/test/fixtures/es2018/object-rest-spread/25/input.js:1:9]
1 │ var {...[]} = {}
· ──
╰────
help: Expected an identifier, like `...rest`.
× Invalid rest element target in destructuring pattern
╭─[babel/packages/babel-parser/test/fixtures/es2018/object-rest-spread/26/input.js:1:19]
1 │ function test({...[]}) {}
· ──
╰────
help: Expected an identifier, like `...rest`.
× A rest element must be last in a destructuring pattern
╭─[babel/packages/babel-parser/test/fixtures/es2018/object-rest-spread/7/input.js:1:7]
1 │ let { ...x, y, z } = obj;
· ────
╰────
× A rest parameter or binding pattern may not have a trailing comma.
╭─[babel/packages/babel-parser/test/fixtures/es2018/object-rest-spread/8/input.js:1:17]
1 │ let { x, y, ...z, } = obj;
· ─
╰────
help: Remove the trailing comma here
× A rest element must be last in a destructuring pattern
╭─[babel/packages/babel-parser/test/fixtures/es2018/object-rest-spread/9/input.js:1:10]
1 │ let { x, ...y, ...z } = obj;
· ────
╰────
× A rest parameter or binding pattern may not have a trailing comma.
╭─[babel/packages/babel-parser/test/fixtures/es2018/object-rest-spread/comma-after-rest/input.js:1:7]
1 │ ({...a,} = {});
· ─
╰────
help: Remove the trailing comma here
× A rest parameter or binding pattern may not have a trailing comma.
╭─[babel/packages/babel-parser/test/fixtures/es2018/object-rest-spread/comma-after-spread-for-in/input.js:1:11]
1 │ for ({...a,} in []);
· ─
╰────
help: Remove the trailing comma here
× A rest parameter or binding pattern may not have a trailing comma.
╭─[babel/packages/babel-parser/test/fixtures/es2018/object-rest-spread/comma-after-spread-nested/input.js:1:7]
1 │ [{...a,}] = [];
· ─
╰────
help: Remove the trailing comma here
× Spread must be last element
╭─[babel/packages/babel-parser/test/fixtures/es2018/object-rest-spread/expression-rest-not-last-invalid/input.js:1:3]
1 │ ({...rest, b} = {})
· ───────
╰────
× Invalid rest element target in destructuring assignment
╭─[babel/packages/babel-parser/test/fixtures/es2018/object-rest-spread/no-pattern-in-rest/input.js:1:6]
1 │ ({...{}} = {})
· ──
╰────
help: Expected an identifier or member expression, like `...rest` or `...obj.prop`.
× Invalid rest element target in destructuring assignment
╭─[babel/packages/babel-parser/test/fixtures/es2018/object-rest-spread/no-pattern-in-rest-with-ts/input.js:1:6]
1 │ ({...{}} = {})
· ──
╰────
help: Expected an identifier or member expression, like `...rest` or `...obj.prop`.
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/es2020/bigint/invalid-decimal/input.js:1:4]
1 │ 1.0n
· ─
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/es2020/bigint/invalid-e/input.js:1:4]
1 │ 2e9n
· ─
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/es2020/bigint/invalid-non-octal-decimal-int/input.js:1:4]
1 │ 089n
· ─
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/es2020/bigint/invalid-octal-legacy/input.js:1:7]
1 │ 016432n
· ─
╰────
× The only valid property accesses on import are `import.meta`, `import.source()`, and `import.defer()`
╭─[babel/packages/babel-parser/test/fixtures/es2020/dynamic-import/direct-calls-only/input.js:2:10]
1 │ function failsParse() {
2 │ return import.then();
· ───────────
3 │ }
╰────
× TS(1325): Argument of dynamic import cannot be a spread element.
╭─[babel/packages/babel-parser/test/fixtures/es2020/dynamic-import/invalid-arguments-spread/input.js:1:8]
1 │ import(...[1])
· ───
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/es2020/dynamic-import/invalid-lone-import/input.js:1:8]
1 │ (import)
· ─
╰────
× Cannot use new with dynamic import
╭─[babel/packages/babel-parser/test/fixtures/es2020/dynamic-import/invalid-new/input.js:1:5]
1 │ new import("foo");
· ─────────────
╰────
help: Wrap this with parenthesis
× Dynamic imports can only accept a module specifier and an optional set of attributes as arguments
╭─[babel/packages/babel-parser/test/fixtures/es2020/dynamic-import/multiple-args/input.js:1:1]
1 │ import('hello', 'world', '!');
· ────────────────────────
╰────
× import() requires a specifier.
╭─[babel/packages/babel-parser/test/fixtures/es2020/dynamic-import/no-args/input.js:1:1]
1 │ import();
· ────────
╰────
× The only valid property accesses on import are `import.meta`, `import.source()`, and `import.defer()`
╭─[babel/packages/babel-parser/test/fixtures/es2020/dynamic-import-createImportExpression-false/direct-calls-only/input.js:2:10]
1 │ function failsParse() {
2 │ return import.then();
· ───────────
3 │ }
╰────
× TS(1325): Argument of dynamic import cannot be a spread element.
╭─[babel/packages/babel-parser/test/fixtures/es2020/dynamic-import-createImportExpression-false/invalid-arguments-spread/input.js:1:8]
1 │ import(...[1])
· ───
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/es2020/dynamic-import-createImportExpression-false/invalid-lone-import/input.js:1:8]
1 │ (import)
· ─
╰────
× Cannot use new with dynamic import
╭─[babel/packages/babel-parser/test/fixtures/es2020/dynamic-import-createImportExpression-false/invalid-new/input.js:1:5]
1 │ new import("foo");
· ─────────────
╰────
help: Wrap this with parenthesis
× Dynamic imports can only accept a module specifier and an optional set of attributes as arguments
╭─[babel/packages/babel-parser/test/fixtures/es2020/dynamic-import-createImportExpression-false/multiple-args/input.js:1:1]
1 │ import('hello', 'world', '!');
· ────────────────────────
╰────
× import() requires a specifier.
╭─[babel/packages/babel-parser/test/fixtures/es2020/dynamic-import-createImportExpression-false/no-args/input.js:1:1]
1 │ import();
· ────────
╰────
× Unexpected import.meta expression
╭─[babel/packages/babel-parser/test/fixtures/es2020/import-meta/error-in-script/input.js:1:11]
1 │ const x = import.meta;
· ───────────
╰────
help: import.meta is only allowed in module code
× The only valid property accesses on import are `import.meta`, `import.source()`, and `import.defer()`
╭─[babel/packages/babel-parser/test/fixtures/es2020/import-meta/no-other-prop-names/input.js:1:1]
1 │ import.notMeta;
· ──────────────
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/es2020/import-meta/not-assignable/input.js:1:1]
1 │ import.meta = true;
· ───────────
╰────
× Logical expressions and coalesce expressions cannot be mixed
╭─[babel/packages/babel-parser/test/fixtures/es2020/nullish-coalescing-operator/no-paren-and-nullish/input.js:1:1]
1 │ c && d ?? e;
· ───────────
╰────
help: Wrap either expression by parentheses
× Logical expressions and coalesce expressions cannot be mixed
╭─[babel/packages/babel-parser/test/fixtures/es2020/nullish-coalescing-operator/no-paren-nullish-and/input.js:1:1]
1 │ a ?? b && c;
· ───────────
╰────
help: Wrap either expression by parentheses
× Logical expressions and coalesce expressions cannot be mixed
╭─[babel/packages/babel-parser/test/fixtures/es2020/nullish-coalescing-operator/no-paren-nullish-or/input.js:1:1]
1 │ e ?? f ?? g || h;
· ────────────────
╰────
help: Wrap either expression by parentheses
× Logical expressions and coalesce expressions cannot be mixed
╭─[babel/packages/babel-parser/test/fixtures/es2020/nullish-coalescing-operator/no-paren-or-nullish/input.js:1:1]
1 │ h || i ?? j;
· ───────────
╰────
help: Wrap either expression by parentheses
× Invalid optional chain from new expression.
╭─[babel/packages/babel-parser/test/fixtures/es2020/optional-chaining/class-contructor-call/input.js:1:6]
1 │ new C?.b.d()
· ──
╰────
× Invalid optional chain from new expression.
╭─[babel/packages/babel-parser/test/fixtures/es2020/optional-chaining/new-createParenthesizedExpressions-false/input.js:1:8]
1 │ new foo?.bar();
· ──
2 │ new foo.bar?.();
╰────
× Invalid optional chain from new expression.
╭─[babel/packages/babel-parser/test/fixtures/es2020/optional-chaining/new-createParenthesizedExpressions-true/input.js:1:8]
1 │ new foo?.bar();
· ──
2 │ new foo.bar?.();
╰────
× Invalid optional chain from new expression.
╭─[babel/packages/babel-parser/test/fixtures/es2020/optional-chaining/new-ts-createParenthesizedExpressions-false/input.ts:1:8]
1 │ new foo?.bar();
· ──
2 │ new foo.bar?.();
╰────
× Invalid optional chain from new expression.
╭─[babel/packages/babel-parser/test/fixtures/es2020/optional-chaining/new-ts-createParenthesizedExpressions-true/input.ts:1:8]
1 │ new foo?.bar();
· ──
2 │ new foo.bar?.();
╰────
× Invalid optional chain from new expression.
╭─[babel/packages/babel-parser/test/fixtures/es2020/optional-chaining/optional-constructor/input.js:1:6]
1 │ new a?.();
· ──
╰────
× 'super' can only be used with function calls or in property accesses
╭─[babel/packages/babel-parser/test/fixtures/es2020/optional-chaining/optional-super-property/input.js:3:16]
2 │ b(){
3 │ return super?.c;
· ─────
4 │ }
╰────
help: Replace with `super()` or `super.prop` or `super[prop]`
× 'super' can only be used with function calls or in property accesses
╭─[babel/packages/babel-parser/test/fixtures/es2020/optional-chaining/optional-super-property-class/input.js:3:16]
2 │ b(){
3 │ return super?.b;
· ─────
4 │ }
╰────
help: Replace with `super()` or `super.prop` or `super[prop]`
× Tagged template expressions are not permitted in an optional chain
╭─[babel/packages/babel-parser/test/fixtures/es2020/optional-chaining/optional-tagged-template-literals/input.js:1:5]
1 │ a?.b`foo`
· ─────
╰────
× The left-hand side of a `for...of` statement may not be `async`
╭─[babel/packages/babel-parser/test/fixtures/es2021/for-async-of/forbidden/input.js:1:6]
1 │ for (async of x);
· ─────
2 │
╰────
help: Did you mean to use a for await...of statement?
× The left-hand side of a `for...of` statement may not be `async`
╭─[babel/packages/babel-parser/test/fixtures/es2021/for-async-of/forbidden/input.js:4:8]
3 │ async () => {
4 │ for (async of x);
· ─────
5 │ }
╰────
help: Did you mean to use a for await...of statement?
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/es2021/for-async-of/forbidden-arrow-function/input.js:1:6]
1 │ for (async of => {} of x);
· ──────────────
╰────
× The left-hand side of a `for...of` statement may not be `async`
╭─[babel/packages/babel-parser/test/fixtures/es2021/for-async-of/forbidden-equals/input.js:3:6]
2 │ // and finds "=" instead of "=>".
3 │ for (async of = x);
· ─────
╰────
help: Did you mean to use a for await...of statement?
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/es2021/for-async-of/forbidden-equals/input.js:3:15]
2 │ // and finds "=" instead of "=>".
3 │ for (async of = x);
· ─
╰────
× Invalid Character `
│ `
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-0/input.js:1:3]
1 │ 1_
· ▲
╰────
× Invalid Character `
│ `
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-1/input.js:1:5]
1 │ 1_1_
· ▲
╰────
× Invalid Character `
│ `
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-10/input.js:1:7]
1 │ 0x1_1_
· ▲
╰────
× Invalid Character `)`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-100/input.js:1:4]
1 │ (1_)
· ▲
╰────
× Invalid Character `)`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-101/input.js:1:6]
1 │ (1_1_)
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-102/input.js:1:6]
1 │ (1_1__)
· ▲
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-102/input.js:1:6]
1 │ (1_1__)
· ─
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-103/input.js:1:4]
1 │ (1__1)
· ▲
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-103/input.js:1:4]
1 │ (1__1)
· ─
╰────
× Invalid Character `.`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-104/input.js:1:6]
1 │ (1_1_.1_1)
· ▲
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-105/input.js:1:6]
1 │ (1_1._1_1)
· ─
╰────
× Invalid Character `e`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-106/input.js:1:8]
1 │ (1_1.1_e1)
· ▲
╰────
× Invalid Character `E`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-107/input.js:1:8]
1 │ (1_1.1_E1)
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-108/input.js:1:8]
1 │ (1_1.1e_1)
· ▲
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-108/input.js:1:8]
1 │ (1_1.1e_1)
· ─
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-109/input.js:1:8]
1 │ (1_1.1E_1)
· ▲
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-109/input.js:1:8]
1 │ (1_1.1E_1)
· ─
╰────
× Invalid Character `
│ `
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-11/input.js:1:7]
1 │ 0xa_1_
· ▲
╰────
× Invalid Character `)`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-110/input.js:1:8]
1 │ (0x1_1_)
· ▲
╰────
× Invalid Character `)`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-111/input.js:1:8]
1 │ (0xa_1_)
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-112/input.js:1:4]
1 │ (0x_a_1)
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-113/input.js:1:4]
1 │ (0x__1_1_)
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-114/input.js:1:4]
1 │ (0x_1__1)
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-115/input.js:1:4]
1 │ (0x_1_1_)
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-116/input.js:1:4]
1 │ (0o_1_1)
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-117/input.js:1:4]
1 │ (0o_11)
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-118/input.js:1:4]
1 │ (0o_01_1_)
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-119/input.js:1:4]
1 │ (0b_0_1_1)
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-12/input.js:1:3]
1 │ 0x_a_1
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-120/input.js:1:4]
1 │ (0b_01_1_)
· ▲
╰────
× Invalid Character `)`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-121/input.js:1:9]
1 │ (0b01_1_)
· ▲
╰────
× Invalid Character `)`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-122/input.js:1:8]
1 │ (0o1_1_)
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-123/input.js:1:4]
1 │ (0o_1_1_)
· ▲
╰────
× Invalid Character `}`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-124/input.js:1:4]
1 │ {1_}
· ▲
╰────
× Invalid Character `}`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-125/input.js:1:6]
1 │ {1_1_}
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-126/input.js:1:6]
1 │ {1_1__}
· ▲
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-126/input.js:1:6]
1 │ {1_1__}
· ─
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-127/input.js:1:4]
1 │ {1__1}
· ▲
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-127/input.js:1:4]
1 │ {1__1}
· ─
╰────
× Invalid Character `.`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-128/input.js:1:6]
1 │ {1_1_.1_1}
· ▲
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-129/input.js:1:6]
1 │ {1_1._1_1}
· ─
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-13/input.js:1:3]
1 │ 0x__1_1_
· ▲
╰────
× Invalid Character `e`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-130/input.js:1:8]
1 │ {1_1.1_e1}
· ▲
╰────
× Invalid Character `E`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-131/input.js:1:8]
1 │ {1_1.1_E1}
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-132/input.js:1:8]
1 │ {1_1.1e_1}
· ▲
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-132/input.js:1:8]
1 │ {1_1.1e_1}
· ─
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-133/input.js:1:8]
1 │ {1_1.1E_1}
· ▲
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-133/input.js:1:8]
1 │ {1_1.1E_1}
· ─
╰────
× Invalid Character `}`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-134/input.js:1:8]
1 │ {0x1_1_}
· ▲
╰────
× Invalid Character `}`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-135/input.js:1:8]
1 │ {0xa_1_}
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-136/input.js:1:4]
1 │ {0x_a_1}
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-137/input.js:1:4]
1 │ {0x__1_1_}
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-138/input.js:1:4]
1 │ {0x_1__1}
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-139/input.js:1:4]
1 │ {0x_1_1_}
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-14/input.js:1:3]
1 │ 0x_1__1
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-140/input.js:1:4]
1 │ {0o_1_1}
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-141/input.js:1:4]
1 │ {0o_11}
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-142/input.js:1:4]
1 │ {0o_01_1_}
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-143/input.js:1:4]
1 │ {0b_0_1_1}
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-144/input.js:1:4]
1 │ {0b_01_1_}
· ▲
╰────
× Invalid Character `}`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-145/input.js:1:9]
1 │ {0b01_1_}
· ▲
╰────
× Invalid Character `}`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-146/input.js:1:8]
1 │ {0o1_1_}
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-147/input.js:1:4]
1 │ {0o_1_1_}
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-15/input.js:1:3]
1 │ 0x_1_1_
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-16/input.js:1:3]
1 │ 0o_1_1
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-17/input.js:1:3]
1 │ 0o_11
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-18/input.js:1:3]
1 │ 0o_01_1_
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-19/input.js:1:3]
1 │ 0b_0_1_1
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-2/input.js:1:5]
1 │ 1_1__
· ▲
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-2/input.js:1:5]
1 │ 1_1__
· ─
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-20/input.js:1:3]
1 │ 0b_01_1_
· ▲
╰────
× Invalid Character `
│ `
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-21/input.js:1:8]
1 │ 0b01_1_
· ▲
╰────
× Invalid Character `
│ `
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-22/input.js:1:7]
1 │ 0o1_1_
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-23/input.js:1:3]
1 │ 0o_1_1_
· ▲
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-24/input.js:1:1]
1 │ ._1_1
· ─
╰────
× Invalid Character `8`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-25/input.js:1:6]
1 │ 0o01_8
· ▲
╰────
× Invalid Character `2`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-26/input.js:1:3]
1 │ 0b2_1
· ▲
╰────
× Invalid Character `Z`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-27/input.js:1:3]
1 │ 0xZ_1
· ▲
╰────
× Invalid Character `;`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-28/input.js:1:3]
1 │ 1_;
· ▲
╰────
× Invalid Character `;`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-29/input.js:1:5]
1 │ 1_1_;
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-3/input.js:1:3]
1 │ 1__1
· ▲
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-3/input.js:1:3]
1 │ 1__1
· ─
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-30/input.js:1:5]
1 │ 1_1__;
· ▲
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-30/input.js:1:5]
1 │ 1_1__;
· ─
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-31/input.js:1:3]
1 │ 1__1;
· ▲
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-31/input.js:1:3]
1 │ 1__1;
· ─
╰────
× Invalid Character `.`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-32/input.js:1:5]
1 │ 1_1_.1_1;
· ▲
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-33/input.js:1:5]
1 │ 1_1._1_1;
· ─
╰────
× Invalid Character `e`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-34/input.js:1:7]
1 │ 1_1.1_e1;
· ▲
╰────
× Invalid Character `E`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-35/input.js:1:7]
1 │ 1_1.1_E1;
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-36/input.js:1:7]
1 │ 1_1.1e_1;
· ▲
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-36/input.js:1:7]
1 │ 1_1.1e_1;
· ─
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-37/input.js:1:7]
1 │ 1_1.1E_1;
· ▲
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-37/input.js:1:7]
1 │ 1_1.1E_1;
· ─
╰────
× Invalid Character `;`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-38/input.js:1:7]
1 │ 0x1_1_;
· ▲
╰────
× Invalid Character `;`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-39/input.js:1:7]
1 │ 0xa_1_;
· ▲
╰────
× Invalid Character `.`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-4/input.js:1:5]
1 │ 1_1_.1_1
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-40/input.js:1:3]
1 │ 0x_a_1;
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-41/input.js:1:3]
1 │ 0x__1_1_;
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-42/input.js:1:3]
1 │ 0x_1__1;
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-43/input.js:1:3]
1 │ 0x_1_1_;
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-44/input.js:1:3]
1 │ 0o_1_1;
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-45/input.js:1:3]
1 │ 0o_11;
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-46/input.js:1:3]
1 │ 0o_01_1_;
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-47/input.js:1:3]
1 │ 0b_0_1_1;
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-48/input.js:1:3]
1 │ 0b_01_1_;
· ▲
╰────
× Invalid Character `;`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-49/input.js:1:8]
1 │ 0b01_1_;
· ▲
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-5/input.js:1:5]
1 │ 1_1._1_1
· ─
╰────
× Invalid Character `;`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-50/input.js:1:7]
1 │ 0o1_1_;
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-51/input.js:1:3]
1 │ 0o_1_1_;
· ▲
╰────
× Invalid Character `,`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-52/input.js:1:3]
1 │ 1_, 0
· ▲
╰────
× Invalid Character `,`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-53/input.js:1:5]
1 │ 1_1_, 0
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-54/input.js:1:5]
1 │ 1_1__, 0
· ▲
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-54/input.js:1:5]
1 │ 1_1__, 0
· ─
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-55/input.js:1:3]
1 │ 1__1, 0
· ▲
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-55/input.js:1:3]
1 │ 1__1, 0
· ─
╰────
× Invalid Character `.`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-56/input.js:1:5]
1 │ 1_1_.1_1, 0
· ▲
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-57/input.js:1:5]
1 │ 1_1._1_1, 0
· ─
╰────
× Invalid Character `e`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-58/input.js:1:7]
1 │ 1_1.1_e1, 0
· ▲
╰────
× Invalid Character `E`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-59/input.js:1:7]
1 │ 1_1.1_E1, 0
· ▲
╰────
× Invalid Character `e`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-6/input.js:1:7]
1 │ 1_1.1_e1
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-60/input.js:1:7]
1 │ 1_1.1e_1, 0
· ▲
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-60/input.js:1:7]
1 │ 1_1.1e_1, 0
· ─
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-61/input.js:1:7]
1 │ 1_1.1E_1, 0
· ▲
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-61/input.js:1:7]
1 │ 1_1.1E_1, 0
· ─
╰────
× Invalid Character `,`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-62/input.js:1:7]
1 │ 0x1_1_, 0
· ▲
╰────
× Invalid Character `,`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-63/input.js:1:7]
1 │ 0xa_1_, 0
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-64/input.js:1:3]
1 │ 0x_a_1, 0
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-65/input.js:1:3]
1 │ 0x__1_1_, 0
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-66/input.js:1:3]
1 │ 0x_1__1, 0
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-67/input.js:1:3]
1 │ 0x_1_1_, 0
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-68/input.js:1:3]
1 │ 0o_1_1, 0
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-69/input.js:1:3]
1 │ 0o_11, 0
· ▲
╰────
× Invalid Character `E`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-7/input.js:1:7]
1 │ 1_1.1_E1
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-70/input.js:1:3]
1 │ 0o_01_1_, 0
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-71/input.js:1:3]
1 │ 0b_0_1_1, 0
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-72/input.js:1:3]
1 │ 0b_01_1_, 0
· ▲
╰────
× Invalid Character `,`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-73/input.js:1:8]
1 │ 0b01_1_, 0
· ▲
╰────
× Invalid Character `,`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-74/input.js:1:7]
1 │ 0o1_1_, 0
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-75/input.js:1:3]
1 │ 0o_1_1_, 0
· ▲
╰────
× Invalid Character `]`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-76/input.js:1:4]
1 │ [1_]
· ▲
╰────
× Invalid Character `]`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-77/input.js:1:6]
1 │ [1_1_]
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-78/input.js:1:6]
1 │ [1_1__]
· ▲
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-78/input.js:1:6]
1 │ [1_1__]
· ─
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-79/input.js:1:4]
1 │ [1__1]
· ▲
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-79/input.js:1:4]
1 │ [1__1]
· ─
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-8/input.js:1:7]
1 │ 1_1.1e_1
· ▲
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-8/input.js:1:7]
1 │ 1_1.1e_1
· ─
╰────
× Invalid Character `.`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-80/input.js:1:6]
1 │ [1_1_.1_1]
· ▲
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-81/input.js:1:6]
1 │ [1_1._1_1]
· ─
╰────
× Invalid Character `e`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-82/input.js:1:8]
1 │ [1_1.1_e1]
· ▲
╰────
× Invalid Character `E`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-83/input.js:1:8]
1 │ [1_1.1_E1]
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-84/input.js:1:8]
1 │ [1_1.1e_1]
· ▲
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-84/input.js:1:8]
1 │ [1_1.1e_1]
· ─
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-85/input.js:1:8]
1 │ [1_1.1E_1]
· ▲
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-85/input.js:1:8]
1 │ [1_1.1E_1]
· ─
╰────
× Invalid Character `]`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-86/input.js:1:8]
1 │ [0x1_1_]
· ▲
╰────
× Invalid Character `]`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-87/input.js:1:8]
1 │ [0xa_1_]
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-88/input.js:1:4]
1 │ [0x_a_1]
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-89/input.js:1:4]
1 │ [0x__1_1_]
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-9/input.js:1:7]
1 │ 1_1.1E_1
· ▲
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-9/input.js:1:7]
1 │ 1_1.1E_1
· ─
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-90/input.js:1:4]
1 │ [0x_1__1]
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-91/input.js:1:4]
1 │ [0x_1_1_]
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-92/input.js:1:4]
1 │ [0o_1_1]
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-93/input.js:1:4]
1 │ [0o_11]
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-94/input.js:1:4]
1 │ [0o_01_1_]
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-95/input.js:1:4]
1 │ [0b_0_1_1]
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-96/input.js:1:4]
1 │ [0b_01_1_]
· ▲
╰────
× Invalid Character `]`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-97/input.js:1:9]
1 │ [0b01_1_]
· ▲
╰────
× Invalid Character `]`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-98/input.js:1:8]
1 │ [0o1_1_]
· ▲
╰────
× Invalid Character `_`
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-99/input.js:1:4]
1 │ [0o_1_1_]
· ▲
╰────
× Invalid escape sequence
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-hex/input.js:1:2]
1 │ "\x1_0";
· ───
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-leading-zero/input.js:1:2]
1 │ 0_8
· ─
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-legacy-octal-literal/input.js:1:3]
1 │ 00_0
· ─
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-non-octal-decimal-int/input.js:1:3]
1 │ 08_0n
· ─
╰────
× Invalid escape sequence
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-unicode/input.js:1:2]
1 │ "\u{1F_639}"
· ─────
╰────
× Invalid escape sequence
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-unicode-2/input.js:1:2]
1 │ "\u12_34"
· ────
╰────
× Invalid Unicode escape sequence
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-unicode-3/input.js:1:2]
1 │ \u{_0061};
· ──
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-unicode-3/input.js:1:9]
1 │ \u{_0061};
· ─
╰────
× Invalid Unicode escape sequence
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-unicode-4/input.js:1:2]
1 │ \u{00__61};
· ────
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-unicode-4/input.js:1:10]
1 │ \u{00__61};
· ─
╰────
× Invalid Unicode escape sequence
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-unicode-5/input.js:1:2]
1 │ \u_0061;
· ─
╰────
× Invalid Unicode escape sequence
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-unicode-6/input.js:1:2]
1 │ \u00__61;
· ───
╰────
× Invalid Unicode escape sequence
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-unicode-7/input.js:1:2]
1 │ \u{0061_};
· ──────
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/invalid-unicode-7/input.js:1:9]
1 │ \u{0061_};
· ─
╰────
× Bad escape sequence in untagged template literal
╭─[babel/packages/babel-parser/test/fixtures/es2021/numeric-separator/template-with-invalid-numeric-separator-in-code-point/input.js:1:2]
1 │ `abc\u{1000_0000}`;
· ────────────────
╰────
× Unexpected private identifier
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-methods/asi-failure-generator/input.js:3:4]
2 │ p = x
3 │ *#m () {}
· ──
4 │ }
╰────
× Classes can't have an element named '#constructor'
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-methods/failure-name-constructor/input.js:2:3]
1 │ class Foo {
2 │ #constructor() {};
· ────────────
3 │ }
╰────
× Invalid Character ` `
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-methods/failure-spaces/input.js:2:4]
1 │ class Spaces {
2 │ # wrongSpaces() {
· ─
3 │ return fail();
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/instance-field-instance-field/input.js:2:3]
1 │ class A {
2 │ #x = 0;
· ─┬
· ╰── `#x` has already been declared here
3 │ #x = 0;
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/instance-field-instance-get/input.js:2:3]
1 │ class A {
2 │ #x = 0;
· ─┬
· ╰── `#x` has already been declared here
3 │ get #x() {}
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/instance-field-instance-method/input.js:2:3]
1 │ class A {
2 │ #x = 0;
· ─┬
· ╰── `#x` has already been declared here
3 │ #x() {}
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/instance-field-instance-set/input.js:2:3]
1 │ class A {
2 │ #x = 0;
· ─┬
· ╰── `#x` has already been declared here
3 │ set #x(_) {}
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/instance-field-static-field/input.js:2:3]
1 │ class A {
2 │ #x = 0;
· ─┬
· ╰── `#x` has already been declared here
3 │ static #x = 0;
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/instance-field-static-get/input.js:2:3]
1 │ class A {
2 │ #x = 0;
· ─┬
· ╰── `#x` has already been declared here
3 │ static get #x() {}
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/instance-field-static-method/input.js:2:3]
1 │ class A {
2 │ #x = 0;
· ─┬
· ╰── `#x` has already been declared here
3 │ static #x() {}
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/instance-field-static-set/input.js:2:3]
1 │ class A {
2 │ #x = 0;
· ─┬
· ╰── `#x` has already been declared here
3 │ static set #x(_) {}
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/instance-get-instance-field/input.js:2:7]
1 │ class A {
2 │ get #x() {}
· ─┬
· ╰── `#x` has already been declared here
3 │ #x = 0;
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/instance-get-instance-get/input.js:2:7]
1 │ class A {
2 │ get #x() {}
· ─┬
· ╰── `#x` has already been declared here
3 │ get #x() {}
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/instance-get-instance-method/input.js:2:7]
1 │ class A {
2 │ get #x() {}
· ─┬
· ╰── `#x` has already been declared here
3 │ #x() {}
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/instance-get-static-field/input.js:2:7]
1 │ class A {
2 │ get #x() {}
· ─┬
· ╰── `#x` has already been declared here
3 │ static #x = 0;
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/instance-get-static-get/input.js:2:7]
1 │ class A {
2 │ get #x() {}
· ─┬
· ╰── `#x` has already been declared here
3 │ static get #x() {}
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/instance-get-static-method/input.js:2:7]
1 │ class A {
2 │ get #x() {}
· ─┬
· ╰── `#x` has already been declared here
3 │ static #x() {}
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/instance-get-static-set/input.js:2:7]
1 │ class A {
2 │ get #x() {}
· ─┬
· ╰── `#x` has already been declared here
3 │ static set #x(_) {}
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/instance-method-instance-field/input.js:2:3]
1 │ class A {
2 │ #x() {}
· ─┬
· ╰── `#x` has already been declared here
3 │ #x = 0;
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/instance-method-instance-get/input.js:2:3]
1 │ class A {
2 │ #x() {}
· ─┬
· ╰── `#x` has already been declared here
3 │ get #x() {}
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/instance-method-instance-method/input.js:2:3]
1 │ class A {
2 │ #x() {}
· ─┬
· ╰── `#x` has already been declared here
3 │ #x() {}
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/instance-method-instance-set/input.js:2:3]
1 │ class A {
2 │ #x() {}
· ─┬
· ╰── `#x` has already been declared here
3 │ set #x(_) {}
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/instance-method-static-field/input.js:2:3]
1 │ class A {
2 │ #x() {}
· ─┬
· ╰── `#x` has already been declared here
3 │ static #x = 0;
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/instance-method-static-get/input.js:2:3]
1 │ class A {
2 │ #x() {}
· ─┬
· ╰── `#x` has already been declared here
3 │ static get #x() {}
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/instance-method-static-method/input.js:2:3]
1 │ class A {
2 │ #x() {}
· ─┬
· ╰── `#x` has already been declared here
3 │ static #x() {}
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/instance-method-static-set/input.js:2:3]
1 │ class A {
2 │ #x() {}
· ─┬
· ╰── `#x` has already been declared here
3 │ static set #x(_) {}
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/instance-set-instance-field/input.js:2:7]
1 │ class A {
2 │ set #x(_) {}
· ─┬
· ╰── `#x` has already been declared here
3 │ #x = 0;
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/instance-set-instance-method/input.js:2:7]
1 │ class A {
2 │ set #x(_) {}
· ─┬
· ╰── `#x` has already been declared here
3 │ #x() {}
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/instance-set-instance-set/input.js:2:7]
1 │ class A {
2 │ set #x(_) {}
· ─┬
· ╰── `#x` has already been declared here
3 │ set #x(_) {}
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/instance-set-static-field/input.js:2:7]
1 │ class A {
2 │ set #x(_) {}
· ─┬
· ╰── `#x` has already been declared here
3 │ static #x = 0;
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/instance-set-static-get/input.js:2:7]
1 │ class A {
2 │ set #x(_) {}
· ─┬
· ╰── `#x` has already been declared here
3 │ static get #x() {}
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/instance-set-static-method/input.js:2:7]
1 │ class A {
2 │ set #x(_) {}
· ─┬
· ╰── `#x` has already been declared here
3 │ static #x() {}
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/instance-set-static-set/input.js:2:7]
1 │ class A {
2 │ set #x(_) {}
· ─┬
· ╰── `#x` has already been declared here
3 │ static set #x(_) {}
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/static-field-instance-field/input.js:2:10]
1 │ class A {
2 │ static #x = 0;
· ─┬
· ╰── `#x` has already been declared here
3 │ #x = 0;
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/static-field-instance-get/input.js:2:10]
1 │ class A {
2 │ static #x = 0;
· ─┬
· ╰── `#x` has already been declared here
3 │ get #x() {}
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/static-field-instance-method/input.js:2:10]
1 │ class A {
2 │ static #x = 0;
· ─┬
· ╰── `#x` has already been declared here
3 │ #x() {}
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/static-field-instance-set/input.js:2:10]
1 │ class A {
2 │ static #x = 0;
· ─┬
· ╰── `#x` has already been declared here
3 │ set #x(_) {}
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/static-field-static-field/input.js:2:10]
1 │ class A {
2 │ static #x = 0;
· ─┬
· ╰── `#x` has already been declared here
3 │ static #x = 0;
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/static-field-static-get/input.js:2:10]
1 │ class A {
2 │ static #x = 0;
· ─┬
· ╰── `#x` has already been declared here
3 │ static get #x() {}
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/static-field-static-method/input.js:2:10]
1 │ class A {
2 │ static #x = 0;
· ─┬
· ╰── `#x` has already been declared here
3 │ static #x() {}
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/static-field-static-set/input.js:2:10]
1 │ class A {
2 │ static #x = 0;
· ─┬
· ╰── `#x` has already been declared here
3 │ static set #x(_) {}
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/static-get-instance-field/input.js:2:14]
1 │ class A {
2 │ static get #x() {}
· ─┬
· ╰── `#x` has already been declared here
3 │ #x = 0;
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/static-get-instance-get/input.js:2:14]
1 │ class A {
2 │ static get #x() {}
· ─┬
· ╰── `#x` has already been declared here
3 │ get #x() {}
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/static-get-instance-method/input.js:2:14]
1 │ class A {
2 │ static get #x() {}
· ─┬
· ╰── `#x` has already been declared here
3 │ #x() {}
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/static-get-instance-set/input.js:2:14]
1 │ class A {
2 │ static get #x() {}
· ─┬
· ╰── `#x` has already been declared here
3 │ set #x(_) {}
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/static-get-static-field/input.js:2:14]
1 │ class A {
2 │ static get #x() {}
· ─┬
· ╰── `#x` has already been declared here
3 │ static #x = 0;
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/static-get-static-get/input.js:2:14]
1 │ class A {
2 │ static get #x() {}
· ─┬
· ╰── `#x` has already been declared here
3 │ static get #x() {}
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/static-get-static-method/input.js:2:14]
1 │ class A {
2 │ static get #x() {}
· ─┬
· ╰── `#x` has already been declared here
3 │ static #x() {}
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/static-method-instance-field/input.js:2:10]
1 │ class A {
2 │ static #x() {}
· ─┬
· ╰── `#x` has already been declared here
3 │ #x = 0;
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/static-method-instance-get/input.js:2:10]
1 │ class A {
2 │ static #x() {}
· ─┬
· ╰── `#x` has already been declared here
3 │ get #x() {}
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/static-method-instance-method/input.js:2:10]
1 │ class A {
2 │ static #x() {}
· ─┬
· ╰── `#x` has already been declared here
3 │ #x() {}
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/static-method-instance-set/input.js:2:10]
1 │ class A {
2 │ static #x() {}
· ─┬
· ╰── `#x` has already been declared here
3 │ set #x(_) {}
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/static-method-static-field/input.js:2:10]
1 │ class A {
2 │ static #x() {}
· ─┬
· ╰── `#x` has already been declared here
3 │ static #x = 0;
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/static-method-static-get/input.js:2:10]
1 │ class A {
2 │ static #x() {}
· ─┬
· ╰── `#x` has already been declared here
3 │ static get #x() {}
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/static-method-static-method/input.js:2:10]
1 │ class A {
2 │ static #x() {}
· ─┬
· ╰── `#x` has already been declared here
3 │ static #x() {}
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/static-method-static-set/input.js:2:10]
1 │ class A {
2 │ static #x() {}
· ─┬
· ╰── `#x` has already been declared here
3 │ static set #x(_) {}
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/static-set-instance-field/input.js:2:14]
1 │ class A {
2 │ static set #x(_) {}
· ─┬
· ╰── `#x` has already been declared here
3 │ #x = 0;
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/static-set-instance-get/input.js:2:14]
1 │ class A {
2 │ static set #x(_) {}
· ─┬
· ╰── `#x` has already been declared here
3 │ get #x() {}
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/static-set-instance-method/input.js:2:14]
1 │ class A {
2 │ static set #x(_) {}
· ─┬
· ╰── `#x` has already been declared here
3 │ #x() {}
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/static-set-instance-set/input.js:2:14]
1 │ class A {
2 │ static set #x(_) {}
· ─┬
· ╰── `#x` has already been declared here
3 │ set #x(_) {}
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/static-set-static-field/input.js:2:14]
1 │ class A {
2 │ static set #x(_) {}
· ─┬
· ╰── `#x` has already been declared here
3 │ static #x = 0;
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/static-set-static-method/input.js:2:14]
1 │ class A {
2 │ static set #x(_) {}
· ─┬
· ╰── `#x` has already been declared here
3 │ static #x() {}
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Identifier `#x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-names-duplicated/static-set-static-set/input.js:2:14]
1 │ class A {
2 │ static set #x(_) {}
· ─┬
· ╰── `#x` has already been declared here
3 │ static set #x(_) {}
· ─┬
· ╰── It can not be redeclared here
4 │ }
╰────
× Expected `;` but found `{`
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-properties/asi-failure-generator/input.js:3:9]
2 │ #p = x
3 │ *m () {}
· ┬
· ╰── `;` expected
4 │ }
╰────
× Expected `;` but found `#identifier`
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-properties/asi-failure-inline/input.js:2:6]
1 │ class Foo {
2 │ #x #y
· ─┬
· ╰── `;` expected
3 │ }
╰────
× Invalid Character `[`
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-properties/failure-computed/input.js:3:4]
2 │ #p = x
3 │ #[m] = 1
· ─
4 │ }
╰────
× The operand of a 'delete' operator cannot be a private identifier.
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-properties/failure-delete-optional-private-property/input.js:4:18]
3 │ constructor() {
4 │ delete this?.#x;
· ──
5 │ }
╰────
× The operand of a 'delete' operator cannot be a private identifier.
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-properties/failure-delete-private-property/input.js:4:12]
3 │ constructor() {
4 │ delete this.#x;
· ───────
5 │ }
╰────
× Classes can't have an element named '#constructor'
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-properties/failure-name-constructor/input.js:2:3]
1 │ class Foo {
2 │ #constructor;
· ────────────
3 │ }
╰────
× Invalid Character `2`
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-properties/failure-numeric-literal/input.js:2:4]
1 │ class Foo {
2 │ #2 = y
· ─
3 │ }
╰────
× Invalid Character `2`
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-properties/failure-numeric-start-identifier/input.js:2:4]
1 │ class Foo {
2 │ #2x = y
· ─
3 │ }
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-properties/failure-shorthand/input.js:4:12]
3 │ constructor() {
4 │ delete #x;
· ──
5 │ }
╰────
× Invalid Character ` `
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-properties/failure-spaces/input.js:2:4]
1 │ class Spaces {
2 │ # wrongSpaces;
· ─
3 │ }
╰────
× Invalid Character `"`
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-properties/failure-string-literal/input.js:2:4]
1 │ class Foo {
2 │ #"p" = x
· ─
3 │ }
╰────
× Private identifier '#x' is not allowed in property names
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-properties/invalid-object-method/input.js:2:11]
1 │ class C {
2 │ #p = ({ #x() {} });
· ──
3 │ }
╰────
× Private identifier '#x' is not allowed in property names
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-properties/invalid-object-property/input.js:2:11]
1 │ class C {
2 │ #p = ({ #x: 42 });
· ──
3 │ }
╰────
× Private identifier '#x' is not allowed in property names
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-properties/invalid-object-property-with-assignment/input.js:4:5]
3 │ m = {
4 │ #x: x,
· ──
5 │ y: y = m
╰────
× Private identifier '#p' is not allowed in property names
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-properties/invalid-ts-type-literal/input.js:2:3]
1 │ interface I {
2 │ #p: string
· ──
3 │ }
╰────
× Private identifier '#p' is not allowed outside class bodies
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-properties/invalid-ts-type-literal/input.js:2:3]
1 │ interface I {
2 │ #p: string
· ──
3 │ }
╰────
× TS(2337): Super calls are not permitted outside constructors or in nested functions inside constructors.
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-properties/super-call/input.js:4:14]
3 │ class C extends D {
4 │ #foo = super();
· ───────
5 │ }
╰────
× Private fields cannot be accessed on super
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-properties/super-private-member-access/input.js:5:5]
4 │ method() {
5 │ super.#x;
· ────────
6 │ }
╰────
× Private field '#priv' must be declared in an enclosing class
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-properties/undeclared-nested/input.js:4:20]
3 │ meth() {
4 │ var prop = foo.#priv;
· ─────
5 │ }
╰────
× Private identifier '#priv' is not allowed outside class bodies
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-private-properties/undeclared-top-level/input.js:1:16]
1 │ var prop = foo.#priv;
· ─────
╰────
× 'arguments' is not allowed in class field initializer
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-properties/arguments/input.js:3:11]
2 │ class A {
3 │ foo = arguments;
· ─────────
4 │ }
╰────
help: Assign the 'arguments' variable to a temporary variable outside
× 'arguments' is not allowed in class field initializer
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-properties/arguments-in-arrow-function/input.js:3:17]
2 │ class A {
3 │ foo = () => arguments;
· ─────────
4 │ }
╰────
help: Assign the 'arguments' variable to a temporary variable outside
× 'arguments' is not allowed in class field initializer
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-properties/arguments-in-nested-class-decorator-call-expression/input.js:3:26]
2 │ class A {
3 │ foo = class B { @bar(arguments) foo };
· ─────────
4 │ }
╰────
help: Assign the 'arguments' variable to a temporary variable outside
× Expected `;` but found `{`
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-properties/asi-failure-computed/input.js:3:10]
2 │ p = x
3 │ [m] () {}
· ┬
· ╰── `;` expected
4 │ }
╰────
× Expected `;` but found `{`
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-properties/asi-failure-generator/input.js:3:9]
2 │ p = x
3 │ *m () {}
· ┬
· ╰── `;` expected
4 │ }
╰────
× Expected `;` but found `Identifier`
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-properties/asi-failure-inline/input.js:2:5]
1 │ class Foo {
2 │ x y
· ┬
· ╰── `;` expected
3 │ }
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-properties/await-in-computed-property-in-params-of-async-arrow/input.js:1:34]
1 │ async( x = class { [await] = x }) => {}
· ▲
╰────
help: Try inserting a semicolon here
× Unexpected new.target expression
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-properties/new-target-invalid/input.js:1:9]
1 │ var x = new.target;
· ──────────
╰────
help: new.target is only allowed in constructors, functions, and class field initializers
× Expected `(` but found `}`
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-properties/no-ctor/input.js:3:1]
2 │ constructor
3 │ }
· ┬
· ╰── `(` expected
╰────
× Expected `(` but found `*`
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-properties/no-ctor-2/input.js:3:3]
2 │ constructor
3 │ *x(){}
· ┬
· ╰── `(` expected
4 │ }
╰────
× Classes may not have a static property named 'prototype'
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-properties/no-static-prototype/input.js:2:10]
1 │ class Foo {
2 │ static prototype
· ─────────
3 │ }
╰────
× Classes may not have a static property named 'prototype'
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-properties/no-static-prototype-2/input.js:2:10]
1 │ class Foo {
2 │ static prototype
· ─────────
3 │ *x(){}
╰────
× Classes can't have a field named 'constructor'
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-properties/static-field-named-constructor/input.js:2:12]
1 │ class Foo {
2 │ static constructor;
· ───────────
3 │ }
╰────
× TS(2337): Super calls are not permitted outside constructors or in nested functions inside constructors.
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-properties/super-call/input.js:4:13]
3 │ class C extends D {
4 │ foo = super();
· ───────
5 │ }
╰────
× 'super' can only be referenced in members of derived classes or object literal expressions.
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-properties/super-inside-function/input.js:3:5]
2 │ foo = function fn() {
3 │ super.x();
· ─────
4 │ }
╰────
× The keyword 'yield' is reserved
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-properties/yield-in-class-property-in-generator/input.js:4:9]
3 │ // here yield is an identifier reference
4 │ p = yield + 42;
· ─────
5 │ }
╰────
note: Classes are always strict mode code
× Cannot use `await` as an identifier in an async context
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-static-block/await-binding-in-async-arrow-function-in-static-block/input.js:3:29]
2 │ // await is not allowed in async arrow
3 │ C = class { static { async (await) => {} } };
· ─────
4 │
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-static-block/await-binding-in-async-arrow-function-in-static-block/input.js:5:38]
4 │
5 │ C = class { static { async (x = await) => {} } };
· ─
6 │
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-static-block/await-binding-in-static-block/input.js:3:28]
2 │ // This file enumerates all the disallowed cases, for allowed cases, see await-binding-*
3 │ C = class { static { await } };
· ─
4 │
╰────
× 'arguments' is not allowed in static initialization block
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-static-block/invalid-arguments/input.js:3:16]
2 │ static {
3 │ this.foo = arguments;
· ─────────
4 │ }
╰────
help: Assign the 'arguments' variable to a temporary variable outside
× Cannot use await in class static initialization block
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-static-block/invalid-await/input.js:5:7]
4 │ static {
5 │ await 42;
· ─────
6 │ }
╰────
× Illegal break statement
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-static-block/invalid-break/input.js:6:9]
5 │ static {
6 │ break;
· ──────
7 │ }
╰────
help: A `break` statement can only be used within an enclosing iteration or switch statement.
× Illegal continue statement: no surrounding iteration statement
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-static-block/invalid-continue/input.js:5:7]
4 │ static {
5 │ continue;
· ─────────
6 │ }
╰────
help: A `continue` statement can only be used within an enclosing `for`, `while` or `do while`
× Decorators are not valid here.
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-static-block/invalid-decorators/input.js:3:3]
2 │ static foo() {}
3 │ @dec
· ────
4 │ static {
╰────
× '0'-prefixed octal literals and octal escape sequences are deprecated
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-static-block/invalid-legacy-octal/input.js:4:5]
3 │ static {
4 │ 042;
· ───
5 │ }
╰────
help: for octal literals use the '0o' prefix instead
× TS(18041): A 'return' statement cannot be used inside a class static block.
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-static-block/invalid-return/input.js:4:5]
3 │ static {
4 │ return this;
· ──────
5 │ }
╰────
× TS(2337): Super calls are not permitted outside constructors or in nested functions inside constructors.
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-static-block/invalid-super-call/input.js:5:5]
4 │ static {
5 │ super();
· ───────
6 │ }
╰────
× A 'yield' expression is only allowed in a generator body.
╭─[babel/packages/babel-parser/test/fixtures/es2022/class-static-block/invalid-yield/input.js:5:7]
4 │ static {
5 │ yield 42;
· ─────
6 │ }
╰────
help: Either remove this `yield` or change the enclosing function to a generator function (`function*`)
× Duplicated export 'foo'
╭─[babel/packages/babel-parser/test/fixtures/es2022/module-string-names/duplicate-exported-binding-check/input.js:2:10]
1 │ const foo = 42, bar = 42;
2 │ export { foo, bar as "foo" }
· ─┬─ ──┬──
· │ ╰── It cannot be redeclared here
· ╰── Export has already been declared here
╰────
× An export name cannot include a unicode lone surrogate
╭─[babel/packages/babel-parser/test/fixtures/es2022/module-string-names/export-name-has-lone-surrogate/input.js:2:17]
1 │ const foo = 42, bar = 42;
2 │ export { foo as "\ud800\udbff" } // should throw
· ──────────────
3 │ export { bar as "\udbff\udfff" } // should not throw
╰────
× Identifier expected.
╭─[babel/packages/babel-parser/test/fixtures/es2022/module-string-names/import-local-is-string/input.js:1:10]
1 │ import { "foo" } from "foo";
· ─────
╰────
× A string literal cannot be used as an exported binding without `from`
╭─[babel/packages/babel-parser/test/fixtures/es2022/module-string-names/string-exported-binding-without-from/input.js:1:10]
1 │ export { "學而時習之,不亦說乎?", "吾道一以貫之。" as "忠恕。" };
· ────────────────────────
╰────
help: Did you mean `export { "學而時習之,不亦說乎?" as "學而時習之,不亦說乎?" } from 'some-module'`?
× A string literal cannot be used as an exported binding without `from`
╭─[babel/packages/babel-parser/test/fixtures/es2022/module-string-names/string-exported-binding-without-from/input.js:1:47]
1 │ export { "學而時習之,不亦說乎?", "吾道一以貫之。" as "忠恕。" };
· ────────────────
╰────
help: Did you mean `export { "吾道一以貫之。" as "忠恕。" } from 'some-module'`?
× Unexpected private identifier
╭─[babel/packages/babel-parser/test/fixtures/es2022/private-in/invalid-private-followed-by-in-1/input.js:5:11]
4 │ method() {
5 │ #a in #b in c
· ──
6 │ }
╰────
× Unexpected private identifier
╭─[babel/packages/babel-parser/test/fixtures/es2022/private-in/invalid-private-followed-by-in-2/input.js:4:9]
3 │ method() {
4 │ 1 + #a in b
· ──
5 │ }
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/es2022/private-in/invalid-private-followed-by-in-3/input.js:5:18]
4 │ method() {
5 │ for (var x = #a in y);
· ──
6 │ }
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/es2022/private-in/invalid-private-followed-by-in-4/input.js:4:11]
3 │ async test() {
4 │ await #x in this
· ──
5 │ }
╰────
× Expected `in` but found `+`
╭─[babel/packages/babel-parser/test/fixtures/es2022/private-in/private-binary-expression-left/input.js:4:8]
3 │ test() {
4 │ #x + 1;
· ┬
· ╰── `in` expected
5 │ }
╰────
× Unexpected private identifier
╭─[babel/packages/babel-parser/test/fixtures/es2022/private-in/private-binary-expression-right/input.js:4:9]
3 │ test() {
4 │ 1 + #x;
· ──
5 │ }
╰────
× Expected `in` but found `;`
╭─[babel/packages/babel-parser/test/fixtures/es2022/private-in/private-expression/input.js:4:7]
3 │ test() {
4 │ #x;
· ┬
· ╰── `in` expected
5 │ }
╰────
× Expected `in` but found `)`
╭─[babel/packages/babel-parser/test/fixtures/es2022/private-in/private-in-parenthesized/input.js:4:8]
3 │ test() {
4 │ (#x) in {};
· ┬
· ╰── `in` expected
5 │ }
╰────
× Private field '#x' must be declared in an enclosing class
╭─[babel/packages/babel-parser/test/fixtures/es2022/private-in/private-in-without-field/input.js:3:5]
2 │ test() {
3 │ #x in {};
· ──
4 │ }
╰────
× `await` is only allowed within async functions and at the top levels of modules
╭─[babel/packages/babel-parser/test/fixtures/es2022/top-level-await-module/inside-arrow/input.js:1:7]
1 │ () => await 0;
· ─────
╰────
help: Either remove this `await` or add the `async` keyword to the enclosing function
× `await` is only allowed within async functions and at the top levels of modules
╭─[babel/packages/babel-parser/test/fixtures/es2022/top-level-await-module/inside-class-property/input.js:2:7]
1 │ export class C {
2 │ p = await 0;
· ─────
3 │ }
╰────
help: Either remove this `await` or add the `async` keyword to the enclosing function
× `await` is only allowed within async functions and at the top levels of modules
╭─[babel/packages/babel-parser/test/fixtures/es2022/top-level-await-module/inside-function/input.js:2:3]
1 │ function fn() {
2 │ await 0;
· ─────
3 │ }
╰────
help: Either remove this `await` or add the `async` keyword to the enclosing function
× `for await` loops are only allowed within async functions and at the top levels of modules
╭─[babel/packages/babel-parser/test/fixtures/es2022/top-level-await-script/for-await/input.js:1:5]
1 │ for await (const a of b);
· ─────
╰────
help: Either remove this `await` or add the `async` keyword to the enclosing function
× `await` is only allowed within async functions and at the top levels of modules
╭─[babel/packages/babel-parser/test/fixtures/es2022/top-level-await-script/top-level/input.js:1:1]
1 │ await 0;
· ─────
╰────
help: Either remove this `await` or add the `async` keyword to the enclosing function
× Invalid regular expression: Invalid unicode flags combination `u` and `v`
╭─[babel/packages/babel-parser/test/fixtures/es2024/regexp-unicode-sets/uv-error/input.js:1:6]
1 │ /a/ugv;
· ─
╰────
help: The `v` flag is a superset of `u`. Use only either of them
× TS(1502): The 'u' and 'v' regular expression flags cannot be enabled at the same time
╭─[babel/packages/babel-parser/test/fixtures/es2024/regexp-unicode-sets/uv-error/input.js:1:1]
1 │ /a/ugv;
· ──────
╰────
help: v flag enables additional syntax over u flag
× Invalid regular expression: Invalid unicode flags combination `u` and `v`
╭─[babel/packages/babel-parser/test/fixtures/es2024/regexp-unicode-sets/vu-error/input.js:1:5]
1 │ /a/vu;
· ─
╰────
help: The `v` flag is a superset of `u`. Use only either of them
× TS(1502): The 'u' and 'v' regular expression flags cannot be enabled at the same time
╭─[babel/packages/babel-parser/test/fixtures/es2024/regexp-unicode-sets/vu-error/input.js:1:1]
1 │ /a/vu;
· ─────
╰────
help: v flag enables additional syntax over u flag
× Expected `{` but found `(`
╭─[babel/packages/babel-parser/test/fixtures/es2025/import-attributes/import-with-call-expression/input.js:2:6]
1 │ import "x"
2 │ with ({});
· ┬
· ╰── `{` expected
╰────
× import() requires a specifier.
╭─[babel/packages/babel-parser/test/fixtures/es2025/import-attributes/incorrect-arity/input.js:1:1]
1 │ import();
· ────────
2 │ import("./foo.json", { with: { type: "json"} }, "unsupported");
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2025/import-attributes/invalid-export-without-from/input.js:2:15]
1 │ const foo = 1;
2 │ export { foo } with { type: "json" };
· ▲
╰────
help: Try inserting a semicolon here
× TS(1325): Argument of dynamic import cannot be a spread element.
╭─[babel/packages/babel-parser/test/fixtures/es2025/import-attributes/invalid-spread-element-import-call/input.js:1:22]
1 │ import("./foo.json", ...[]);
· ───
╰────
× Identifier `type` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2025/import-attributes/invalid-syntax-export-with-repeated-type/input.js:1:50]
1 │ export { default as foo } from "foo.json" with { type: "json", type: "html" };
· ──┬─ ──┬─
· │ ╰── It can not be redeclared here
· ╰── `type` has already been declared here
╰────
× Expected `{` but found `;`
╭─[babel/packages/babel-parser/test/fixtures/es2025/import-attributes/invalid-syntax-export-without-attributes-identifier/input.js:1:29]
1 │ export { x } from "foo" with;
· ┬
· ╰── `{` expected
╰────
× Identifier `type` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2025/import-attributes/invalid-syntax-with-repeated-type/input.js:1:35]
1 │ import foo from "foo.json" with { type: "json", type: "html" };
· ──┬─ ──┬─
· │ ╰── It can not be redeclared here
· ╰── `type` has already been declared here
╰────
× Identifier `type` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2025/import-attributes/invalid-syntax-with-repeated-type-string/input.js:1:35]
1 │ import foo from "foo.json" with { "type": "json", type: "html", "type": "js" };
· ───┬── ──┬─
· │ ╰── It can not be redeclared here
· ╰── `type` has already been declared here
╰────
× Identifier `type` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2025/import-attributes/invalid-syntax-with-repeated-type-string/input.js:1:51]
1 │ import foo from "foo.json" with { "type": "json", type: "html", "type": "js" };
· ──┬─ ───┬──
· │ ╰── It can not be redeclared here
· ╰── `type` has already been declared here
╰────
× Expected `{` but found `;`
╭─[babel/packages/babel-parser/test/fixtures/es2025/import-attributes/invalid-syntax-without-attributes-identifier/input.js:1:16]
1 │ import "x" with;
· ┬
· ╰── `{` expected
╰────
× Expected `:` but found `,`
╭─[babel/packages/babel-parser/test/fixtures/es2025/import-attributes/invalid-with-entry-no-colon/input.js:1:25]
1 │ import "foo" with { type, "json" };
· ┬
· ╰── `:` expected
╰────
× Only string literals are allowed as module attribute values.
╭─[babel/packages/babel-parser/test/fixtures/es2025/import-attributes/valid-syntax-export-with-invalid-value/input.js:1:63]
1 │ export { default } from "foo.json" with { type: "json", lazy: true, startAtLine: 1 };
· ────
╰────
help: Wrap this with quotes
× Only string literals are allowed as module attribute values.
╭─[babel/packages/babel-parser/test/fixtures/es2025/import-attributes/valid-syntax-with-invalid-value/input.js:1:55]
1 │ import foo from "foo.json" with { type: "json", lazy: true, startAtLine: 1 };
· ────
╰────
help: Wrap this with quotes
× Identifier `f` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2026/async-explicit-resource-management/invalid-duplicate-using-bindings/input.js:3:17]
2 │ {
3 │ await using f = foo(), f = foo();
· ┬ ┬
· │ ╰── It can not be redeclared here
· ╰── `f` has already been declared here
4 │ }
╰────
× Identifier `g` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2026/async-explicit-resource-management/invalid-duplicate-using-bindings/input.js:6:17]
5 │ {
6 │ await using g = foo();
· ┬
· ╰── `g` has already been declared here
7 │ await using g = foo();
· ┬
· ╰── It can not be redeclared here
8 │ }
╰────
× Using declarations cannot be exported directly.
╭─[babel/packages/babel-parser/test/fixtures/es2026/async-explicit-resource-management/invalid-export-await-using/input.js:1:8]
1 │ export await using basic = reader();
· ─────────────────
╰────
help: Remove the `export` here and add `export { basic }` as a separate statement to export the declaration
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2026/async-explicit-resource-management/invalid-export-default-await-using/input.js:1:27]
1 │ export default await using basic = reader();
· ▲
╰────
help: Try inserting a semicolon here
× Expected `;` but found `Identifier`
╭─[babel/packages/babel-parser/test/fixtures/es2026/async-explicit-resource-management/invalid-for-of-await-linebreak-using/input.js:3:11]
2 │ for (await
3 │ using basic of []);
· ──┬──
· ╰── `;` expected
4 │ }
╰────
× Expected `;` but found `Identifier`
╭─[babel/packages/babel-parser/test/fixtures/es2026/async-explicit-resource-management/invalid-for-of-await-using-linebreak/input.js:3:5]
2 │ for (await using
3 │ basic of []);
· ──┬──
· ╰── `;` expected
4 │ }
╰────
× Lexical declaration cannot appear in a single-statement context
╭─[babel/packages/babel-parser/test/fixtures/es2026/async-explicit-resource-management/invalid-in-single-statement-context-async/input.js:2:13]
1 │ async function f() {
2 │ while (1) await using a = foo;
· ────────────────────
3 │ for (;;) await using b = foo;
╰────
help: Wrap this declaration in a block statement
× Lexical declaration cannot appear in a single-statement context
╭─[babel/packages/babel-parser/test/fixtures/es2026/async-explicit-resource-management/invalid-in-single-statement-context-async/input.js:3:12]
2 │ while (1) await using a = foo;
3 │ for (;;) await using b = foo;
· ────────────────────
4 │ do await using c = foo; while (1);
╰────
help: Wrap this declaration in a block statement
× Lexical declaration cannot appear in a single-statement context
╭─[babel/packages/babel-parser/test/fixtures/es2026/async-explicit-resource-management/invalid-in-single-statement-context-async/input.js:4:6]
3 │ for (;;) await using b = foo;
4 │ do await using c = foo; while (1);
· ────────────────────
5 │ if (1) await using d = foo;
╰────
help: Wrap this declaration in a block statement
× Lexical declaration cannot appear in a single-statement context
╭─[babel/packages/babel-parser/test/fixtures/es2026/async-explicit-resource-management/invalid-in-single-statement-context-async/input.js:5:10]
4 │ do await using c = foo; while (1);
5 │ if (1) await using d = foo;
· ────────────────────
6 │ with (1) await using e = foo;
╰────
help: Wrap this declaration in a block statement
× Lexical declaration cannot appear in a single-statement context
╭─[babel/packages/babel-parser/test/fixtures/es2026/async-explicit-resource-management/invalid-in-single-statement-context-async/input.js:6:12]
5 │ if (1) await using d = foo;
6 │ with (1) await using e = foo;
· ────────────────────
7 │ label: await using f = foo;
╰────
help: Wrap this declaration in a block statement
× Lexical declaration cannot appear in a single-statement context
╭─[babel/packages/babel-parser/test/fixtures/es2026/async-explicit-resource-management/invalid-in-single-statement-context-async/input.js:7:10]
6 │ with (1) await using e = foo;
7 │ label: await using f = foo;
· ────────────────────
8 │ }
╰────
help: Wrap this declaration in a block statement
× Lexical declaration cannot appear in a single-statement context
╭─[babel/packages/babel-parser/test/fixtures/es2026/async-explicit-resource-management/invalid-in-single-statement-context-sync/input.js:2:13]
1 │ {
2 │ while (1) await using a = foo;
· ────────────────────
3 │ for (;0;) await using b = foo;
╰────
help: Wrap this declaration in a block statement
× Lexical declaration cannot appear in a single-statement context
╭─[babel/packages/babel-parser/test/fixtures/es2026/async-explicit-resource-management/invalid-in-single-statement-context-sync/input.js:3:13]
2 │ while (1) await using a = foo;
3 │ for (;0;) await using b = foo;
· ────────────────────
4 │ do await using c = foo; while (1);
╰────
help: Wrap this declaration in a block statement
× Lexical declaration cannot appear in a single-statement context
╭─[babel/packages/babel-parser/test/fixtures/es2026/async-explicit-resource-management/invalid-in-single-statement-context-sync/input.js:4:6]
3 │ for (;0;) await using b = foo;
4 │ do await using c = foo; while (1);
· ────────────────────
5 │ if (1) await using d = foo;
╰────
help: Wrap this declaration in a block statement
× Lexical declaration cannot appear in a single-statement context
╭─[babel/packages/babel-parser/test/fixtures/es2026/async-explicit-resource-management/invalid-in-single-statement-context-sync/input.js:5:10]
4 │ do await using c = foo; while (1);
5 │ if (1) await using d = foo;
· ────────────────────
6 │ with (1) await using e = foo;
╰────
help: Wrap this declaration in a block statement
× Lexical declaration cannot appear in a single-statement context
╭─[babel/packages/babel-parser/test/fixtures/es2026/async-explicit-resource-management/invalid-in-single-statement-context-sync/input.js:6:12]
5 │ if (1) await using d = foo;
6 │ with (1) await using e = foo;
· ────────────────────
7 │ label: await using f = foo;
╰────
help: Wrap this declaration in a block statement
× Lexical declaration cannot appear in a single-statement context
╭─[babel/packages/babel-parser/test/fixtures/es2026/async-explicit-resource-management/invalid-in-single-statement-context-sync/input.js:7:10]
6 │ with (1) await using e = foo;
7 │ label: await using f = foo;
· ────────────────────
8 │ }
╰────
help: Wrap this declaration in a block statement
× 'await using' declaration cannot appear in the bare case statement.
╭─[babel/packages/babel-parser/test/fixtures/es2026/async-explicit-resource-management/invalid-module-bare-case-await-using-binding/input.js:5:7]
4 │ {}
5 │ await using x = bar();
· ──────────────────────
6 │ default:
╰────
help: Wrap this declaration in a block statement
× 'await using' declaration cannot appear in the bare case statement.
╭─[babel/packages/babel-parser/test/fixtures/es2026/async-explicit-resource-management/invalid-module-bare-case-await-using-binding/input.js:8:7]
7 │ {}
8 │ await using y = bar();
· ──────────────────────
9 │ }
╰────
help: Wrap this declaration in a block statement
× 'await using' declaration cannot appear in the bare case statement.
╭─[babel/packages/babel-parser/test/fixtures/es2026/async-explicit-resource-management/invalid-script-bare-case-await-using-binding/input.js:5:7]
4 │ {}
5 │ await using x = bar();
· ──────────────────────
6 │ default:
╰────
help: Wrap this declaration in a block statement
× 'await using' declaration cannot appear in the bare case statement.
╭─[babel/packages/babel-parser/test/fixtures/es2026/async-explicit-resource-management/invalid-script-bare-case-await-using-binding/input.js:8:7]
7 │ {}
8 │ await using y = bar();
· ──────────────────────
9 │ }
╰────
help: Wrap this declaration in a block statement
× Lexical declaration cannot appear in a single-statement context
╭─[babel/packages/babel-parser/test/fixtures/es2026/async-explicit-resource-management/invalid-script-top-level-labeled-using-binding/input.js:1:8]
1 │ label: await using x = bar();
· ──────────────────────
╰────
help: Wrap this declaration in a block statement
× 'using' declarations are not allowed at the top level of a script
╭─[babel/packages/babel-parser/test/fixtures/es2026/async-explicit-resource-management/invalid-script-top-level-labeled-using-binding/input.js:1:8]
1 │ label: await using x = bar();
· ──────────────────────
╰────
help: Wrap this code in a block or use a module
× 'using' declarations are not allowed at the top level of a script
╭─[babel/packages/babel-parser/test/fixtures/es2026/async-explicit-resource-management/invalid-script-top-level-using-binding/input.js:1:1]
1 │ await using x = bar();
· ──────────────────────
╰────
help: Wrap this code in a block or use a module
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/es2026/async-explicit-resource-management/invalid-using-array-pattern/input.js:2:3]
1 │ async function f() {
2 │ await using [ foo ] = f();
· ───────────────────
3 │ }
╰────
× Cannot use `await` as an identifier in an async context
╭─[babel/packages/babel-parser/test/fixtures/es2026/async-explicit-resource-management/invalid-using-binding-await-module/input.js:2:15]
1 │ async function f () {
2 │ await using await = h();
· ─────
3 │ }
╰────
× Cannot use `await` as an identifier in an async context
╭─[babel/packages/babel-parser/test/fixtures/es2026/async-explicit-resource-management/invalid-using-binding-await-module/input.js:5:15]
4 │ async function g () {
5 │ await using \u0061wait = h();
· ──────────
6 │ }
╰────
× Cannot use `await` as an identifier in an async context
╭─[babel/packages/babel-parser/test/fixtures/es2026/async-explicit-resource-management/invalid-using-binding-await-module/input.js:8:24]
7 │ async function h () {
8 │ await using x = h(), await = h();
· ─────
9 │ }
╰────
× Cannot use `await` as an identifier in an async context
╭─[babel/packages/babel-parser/test/fixtures/es2026/async-explicit-resource-management/invalid-using-binding-await-module/input.js:11:20]
10 │ async function i () {
11 │ for (await using await of []);
· ─────
12 │ }
╰────
× The keyword 'await' is reserved
╭─[babel/packages/babel-parser/test/fixtures/es2026/async-explicit-resource-management/invalid-using-binding-await-module/input.js:2:15]
1 │ async function f () {
2 │ await using await = h();
· ─────
3 │ }
╰────
note: The identifier `await` is reserved in module code
× The keyword 'await' is reserved
╭─[babel/packages/babel-parser/test/fixtures/es2026/async-explicit-resource-management/invalid-using-binding-await-module/input.js:5:15]
4 │ async function g () {
5 │ await using \u0061wait = h();
· ──────────
6 │ }
╰────
note: The identifier `await` is reserved in module code
× The keyword 'await' is reserved
╭─[babel/packages/babel-parser/test/fixtures/es2026/async-explicit-resource-management/invalid-using-binding-await-module/input.js:8:24]
7 │ async function h () {
8 │ await using x = h(), await = h();
· ─────
9 │ }
╰────
note: The identifier `await` is reserved in module code
× The keyword 'await' is reserved
╭─[babel/packages/babel-parser/test/fixtures/es2026/async-explicit-resource-management/invalid-using-binding-await-module/input.js:11:20]
10 │ async function i () {
11 │ for (await using await of []);
· ─────
12 │ }
╰────
note: The identifier `await` is reserved in module code
× Cannot use `await` as an identifier in an async context
╭─[babel/packages/babel-parser/test/fixtures/es2026/async-explicit-resource-management/invalid-using-binding-await-script/input.js:2:15]
1 │ async function f() {
2 │ await using await = h();
· ─────
3 │ }
╰────
× Cannot use `await` as an identifier in an async context
╭─[babel/packages/babel-parser/test/fixtures/es2026/async-explicit-resource-management/invalid-using-binding-await-script/input.js:5:15]
4 │ async function f() {
5 │ await using \u0061wait = h();
· ──────────
6 │ }
╰────
× Cannot use `await` as an identifier in an async context
╭─[babel/packages/babel-parser/test/fixtures/es2026/async-explicit-resource-management/invalid-using-binding-await-script/input.js:8:24]
7 │ async function f() {
8 │ await using x = h(), await = h();
· ─────
9 │ }
╰────
× Cannot use `await` as an identifier in an async context
╭─[babel/packages/babel-parser/test/fixtures/es2026/async-explicit-resource-management/invalid-using-binding-await-script/input.js:11:20]
10 │ async function f() {
11 │ for (await using await of []);
· ─────
12 │ }
╰────
× `let` cannot be declared as a variable name inside of a `await using` declaration
╭─[babel/packages/babel-parser/test/fixtures/es2026/async-explicit-resource-management/invalid-using-binding-let/input.js:2:15]
1 │ async function f() {
2 │ await using let = h();
· ───
3 │ }
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2026/async-explicit-resource-management/invalid-using-decl-as-expr/input.js:2:16]
1 │ async function f() {
2 │ 0,await using basic = getReader();
· ▲
3 │ }
╰────
help: Try inserting a semicolon here
× Using declarations must have an initializer.
╭─[babel/packages/babel-parser/test/fixtures/es2026/async-explicit-resource-management/invalid-using-no-initializer/input.js:2:15]
1 │ async function f() {
2 │ await using f;
· ─
3 │ }
╰────
help: Add an initializer (e.g. ` = undefined`) here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2026/async-explicit-resource-management/invalid-using-object-pattern/input.js:2:14]
1 │ async function f() {
2 │ await using { foo } = f();
· ▲
3 │ }
╰────
help: Try inserting a semicolon here
× Using declarations may not have binding patterns.
╭─[babel/packages/babel-parser/test/fixtures/es2026/explicit-resource-management/disallow-destructuring/input.js:1:17]
1 │ using x = null, {} = null;
· ──
2 │ using y = null, [] = null;
╰────
× Using declarations may not have binding patterns.
╭─[babel/packages/babel-parser/test/fixtures/es2026/explicit-resource-management/disallow-destructuring/input.js:2:17]
1 │ using x = null, {} = null;
2 │ using y = null, [] = null;
· ──
3 │ using {} = null;
╰────
× Using declarations may not have binding patterns.
╭─[babel/packages/babel-parser/test/fixtures/es2026/explicit-resource-management/disallow-destructuring/input.js:3:7]
2 │ using y = null, [] = null;
3 │ using {} = null;
· ──
╰────
× Identifier `f` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2026/explicit-resource-management/invalid-duplicate-using-bindings/input.js:2:9]
1 │ {
2 │ using f = foo(), f = foo();
· ┬ ┬
· │ ╰── It can not be redeclared here
· ╰── `f` has already been declared here
3 │ }
╰────
× Identifier `g` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/es2026/explicit-resource-management/invalid-duplicate-using-bindings/input.js:5:9]
4 │ {
5 │ using g = foo();
· ┬
· ╰── `g` has already been declared here
6 │ using g = foo();
· ┬
· ╰── It can not be redeclared here
7 │ }
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/es2026/explicit-resource-management/invalid-export-default-using/input.js:1:21]
1 │ export default using basic = reader();
· ▲
╰────
help: Try inserting a semicolon here
× Using declarations cannot be exported directly.
╭─[babel/packages/babel-parser/test/fixtures/es2026/explicit-resource-management/invalid-export-using/input.js:1:8]
1 │ export using basic = reader();
· ───────────
╰────
help: Remove the `export` here and add `export { basic }` as a separate statement to export the declaration
× Expected `)` but found `of`
╭─[babel/packages/babel-parser/test/fixtures/es2026/explicit-resource-management/invalid-for-await-using-binding-of-of/input.mjs:1:24]
1 │ for await (using of of of);
· ┬ ─┬
· │ ╰── `)` expected
· ╰── Opened here
╰────
× The left-hand side of a for...in statement cannot be an using declaration.
╭─[babel/packages/babel-parser/test/fixtures/es2026/explicit-resource-management/invalid-for-using-binding-in/input.js:1:6]
1 │ for (using foo in {});
· ─────────
╰────
help: Did you mean to use a for...of statement?
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/es2026/explicit-resource-management/invalid-for-using-binding-of-in/input.js:1:15]
1 │ for (using of in []);
· ──
╰────
× Expected `)` but found `of`
╭─[babel/packages/babel-parser/test/fixtures/es2026/explicit-resource-management/invalid-for-using-binding-of-of/input.js:1:18]
1 │ for (using of of of);
· ┬ ─┬
· │ ╰── `)` expected
· ╰── Opened here
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/es2026/explicit-resource-management/invalid-for-using-of-equal-equal/input.js:1:15]
1 │ for (using of == {};;);
· ──
╰────
× Using declarations must have an initializer.
╭─[babel/packages/babel-parser/test/fixtures/es2026/explicit-resource-management/invalid-for-using-of-no-initializer/input.js:1:12]
1 │ for (using of;of.isValid;);
· ──
╰────
help: Add an initializer (e.g. ` = undefined`) here
× Lexical declaration cannot appear in a single-statement context
╭─[babel/packages/babel-parser/test/fixtures/es2026/explicit-resource-management/invalid-in-single-statement-context/input.js:2:13]
1 │ {
2 │ while (1) using a = foo;
· ──────────────
3 │ for (;;) using b = foo;
╰────
help: Wrap this declaration in a block statement
× Lexical declaration cannot appear in a single-statement context
╭─[babel/packages/babel-parser/test/fixtures/es2026/explicit-resource-management/invalid-in-single-statement-context/input.js:3:12]
2 │ while (1) using a = foo;
3 │ for (;;) using b = foo;
· ──────────────
4 │ do using c = foo; while (1);
╰────
help: Wrap this declaration in a block statement
× Lexical declaration cannot appear in a single-statement context
╭─[babel/packages/babel-parser/test/fixtures/es2026/explicit-resource-management/invalid-in-single-statement-context/input.js:4:6]
3 │ for (;;) using b = foo;
4 │ do using c = foo; while (1);
· ──────────────
5 │ if (1) using d = foo;
╰────
help: Wrap this declaration in a block statement
× Lexical declaration cannot appear in a single-statement context
╭─[babel/packages/babel-parser/test/fixtures/es2026/explicit-resource-management/invalid-in-single-statement-context/input.js:5:10]
4 │ do using c = foo; while (1);
5 │ if (1) using d = foo;
· ──────────────
6 │ with (1) using e = foo;
╰────
help: Wrap this declaration in a block statement
× Lexical declaration cannot appear in a single-statement context
╭─[babel/packages/babel-parser/test/fixtures/es2026/explicit-resource-management/invalid-in-single-statement-context/input.js:6:12]
5 │ if (1) using d = foo;
6 │ with (1) using e = foo;
· ──────────────
7 │ label: using f = foo;
╰────
help: Wrap this declaration in a block statement
× Lexical declaration cannot appear in a single-statement context
╭─[babel/packages/babel-parser/test/fixtures/es2026/explicit-resource-management/invalid-in-single-statement-context/input.js:7:10]
6 │ with (1) using e = foo;
7 │ label: using f = foo;
· ──────────────
8 │ }
╰────
help: Wrap this declaration in a block statement
× Lexical declaration cannot appear in a single-statement context
╭─[babel/packages/babel-parser/test/fixtures/es2026/explicit-resource-management/invalid-labeled-using-binding/input.js:2:10]
1 │ {
2 │ label: using x = bar();
· ────────────────
3 │ }
╰────
help: Wrap this declaration in a block statement
× 'using' declaration cannot appear in the bare case statement.
╭─[babel/packages/babel-parser/test/fixtures/es2026/explicit-resource-management/invalid-module-bare-case-using-binding/input.js:5:7]
4 │ {}
5 │ using x = bar();
· ────────────────
6 │ default:
╰────
help: Wrap this declaration in a block statement
× 'using' declaration cannot appear in the bare case statement.
╭─[babel/packages/babel-parser/test/fixtures/es2026/explicit-resource-management/invalid-module-bare-case-using-binding/input.js:8:7]
7 │ {}
8 │ using y = bar();
· ────────────────
9 │ }
╰────
help: Wrap this declaration in a block statement
× 'using' declaration cannot appear in the bare case statement.
╭─[babel/packages/babel-parser/test/fixtures/es2026/explicit-resource-management/invalid-script-bare-case-using-binding/input.js:5:7]
4 │ {}
5 │ using x = bar();
· ────────────────
6 │ default:
╰────
help: Wrap this declaration in a block statement
× 'using' declaration cannot appear in the bare case statement.
╭─[babel/packages/babel-parser/test/fixtures/es2026/explicit-resource-management/invalid-script-bare-case-using-binding/input.js:8:7]
7 │ {}
8 │ using y = bar();
· ────────────────
9 │ }
╰────
help: Wrap this declaration in a block statement
× Lexical declaration cannot appear in a single-statement context
╭─[babel/packages/babel-parser/test/fixtures/es2026/explicit-resource-management/invalid-script-top-level-labeled-using-binding/input.js:1:8]
1 │ label: using x = bar();
· ────────────────
╰────
help: Wrap this declaration in a block statement
× 'using' declarations are not allowed at the top level of a script
╭─[babel/packages/babel-parser/test/fixtures/es2026/explicit-resource-management/invalid-script-top-level-labeled-using-binding/input.js:1:8]
1 │ label: using x = bar();
· ────────────────
╰────
help: Wrap this code in a block or use a module
× 'using' declarations are not allowed at the top level of a script
╭─[babel/packages/babel-parser/test/fixtures/es2026/explicit-resource-management/invalid-script-top-level-using-binding/input.js:1:1]
1 │ using x = bar();
· ────────────────
╰────
help: Wrap this code in a block or use a module
× Cannot use `await` as an identifier in an async context
╭─[babel/packages/babel-parser/test/fixtures/es2026/explicit-resource-management/invalid-using-binding-await-module/input.js:2:9]
1 │ {
2 │ using await = h();
· ─────
3 │ }
╰────
× Cannot use `await` as an identifier in an async context
╭─[babel/packages/babel-parser/test/fixtures/es2026/explicit-resource-management/invalid-using-binding-await-module/input.js:5:9]
4 │ {
5 │ using \u0061wait = h();
· ──────────
6 │ }
╰────
× Cannot use `await` as an identifier in an async context
╭─[babel/packages/babel-parser/test/fixtures/es2026/explicit-resource-management/invalid-using-binding-await-module/input.js:8:18]
7 │ {
8 │ using x = h(), await = h();
· ─────
9 │ }
╰────
× Cannot use `await` as an identifier in an async context
╭─[babel/packages/babel-parser/test/fixtures/es2026/explicit-resource-management/invalid-using-binding-await-module/input.js:11:14]
10 │ {
11 │ for (using await of []);
· ─────
12 │ }
╰────
× The keyword 'await' is reserved
╭─[babel/packages/babel-parser/test/fixtures/es2026/explicit-resource-management/invalid-using-binding-await-module/input.js:2:9]
1 │ {
2 │ using await = h();
· ─────
3 │ }
╰────
note: The identifier `await` is reserved in module code
× The keyword 'await' is reserved
╭─[babel/packages/babel-parser/test/fixtures/es2026/explicit-resource-management/invalid-using-binding-await-module/input.js:5:9]
4 │ {
5 │ using \u0061wait = h();
· ──────────
6 │ }
╰────
note: The identifier `await` is reserved in module code
× The keyword 'await' is reserved
╭─[babel/packages/babel-parser/test/fixtures/es2026/explicit-resource-management/invalid-using-binding-await-module/input.js:8:18]
7 │ {
8 │ using x = h(), await = h();
· ─────
9 │ }
╰────
note: The identifier `await` is reserved in module code
× The keyword 'await' is reserved
╭─[babel/packages/babel-parser/test/fixtures/es2026/explicit-resource-management/invalid-using-binding-await-module/input.js:11:14]
10 │ {
11 │ for (using await of []);
· ─────
12 │ }
╰────
note: The identifier `await` is reserved in module code
× `let` cannot be declared as a variable name inside of a `using` declaration
╭─[babel/packages/babel-parser/test/fixtures/es2026/explicit-resource-management/invalid-using-binding-let/input.js:2:9]
1 │ {
2 │ using let = h();
· ───
3 │ }
╰────
× Expected `;` but found `{`
╭─[babel/packages/babel-parser/test/fixtures/es2026/explicit-resource-management/invalid-using-binding-pattern-for-lhs/input.js:2:14]
1 │ {
2 │ for (using { qux } of h());
· ┬
· ╰── `;` expected
3 │ }
╰────
× Using declarations must have an initializer.
╭─[babel/packages/babel-parser/test/fixtures/es2026/explicit-resource-management/invalid-using-no-initializer/input.js:2:9]
1 │ {
2 │ using f;
· ─
3 │ }
╰────
help: Add an initializer (e.g. ` = undefined`) here
× Identifier `x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/esprima/declaration-function/dupe-param/input.js:1:12]
1 │ function a(x, x) {'use strict';}
· ┬ ┬
· │ ╰── It can not be redeclared here
· ╰── `x` has already been declared here
╰────
× Identifier `b` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-array-binding-pattern/invalid-dup-param/input.js:1:6]
1 │ ([a,[b],...b])=>0;
· ┬ ┬
· │ ╰── It can not be redeclared here
· ╰── `b` has already been declared here
╰────
× A rest parameter or binding pattern may not have a trailing comma.
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-array-binding-pattern/invalid-elision-after-rest/input.js:1:9]
1 │ ([a,...b,])=>0;
· ─
╰────
help: Remove the trailing comma here
× Identifier `a` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-array-pattern/dupe-param-1/input.js:2:13]
1 │ "use strict";
2 │ function a([a,a]){ }
· ┬ ┬
· │ ╰── It can not be redeclared here
· ╰── `a` has already been declared here
╰────
× Identifier `a` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-array-pattern/dupe-param-2/input.js:2:13]
1 │ "use strict";
2 │ function a([a,...a]){ }
· ┬ ┬
· │ ╰── It can not be redeclared here
· ╰── `a` has already been declared here
╰────
× Identifier `a` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-array-pattern/dupe-param-3/input.js:2:14]
1 │ "use strict";
2 │ function a([{a},...a]){ }
· ┬ ┬
· │ ╰── It can not be redeclared here
· ╰── `a` has already been declared here
╰────
× Expected `)` but found `=`
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-array-pattern/with-default-catch-param-fail/input.js:1:20]
1 │ try { } catch ([a] = []) { }
· ┬
· ╰── `)` expected
╰────
× Expected `,` or `)` but found `...`
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/arrow-rest-forgetting-comma/input.js:1:4]
1 │ (a ...b) => 0
· ┬ ─┬─
· │ ╰── `,` or `)` expected
· ╰── Opened here
╰────
× A rest parameter must be last in a parameter list
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/arrow-with-multiple-rest/input.js:1:2]
1 │ (...a, ...b) => 0
· ────
╰────
× Identifier `a` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/complex-rest-in-arrow-not-allowed/input.js:1:2]
1 │ (a,...[a]) => 0;
· ┬ ┬
· │ ╰── It can not be redeclared here
· ╰── `a` has already been declared here
╰────
× Identifier `x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/invalid-duplicated-params/input.js:1:2]
1 │ (x, x) => y;
· ┬ ┬
· │ ╰── It can not be redeclared here
· ╰── `x` has already been declared here
╰────
× Line terminator not permitted before arrow
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/invalid-line-terminator-arrow/input.js:2:1]
1 │ ()
2 │ => 42
· ──
╰────
help: Remove the line break before here
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/invalid-param-strict-mode/input.js:1:1]
1 │ eval => {"use strict"};
· ────
╰────
note: This is strict mode code
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/non-arrow-param-followed-by-arrow/input.js:1:6]
1 │ ((a)) => 0
· ▲
╰────
help: Try inserting a semicolon here
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/non-arrow-param-followed-by-rest/input.js:1:6]
1 │ ((a),...b) => 0;
· ───
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern-invalid-member-expr/input.js:1:11]
1 │ ({a:b[0]})=>0
· ▲
╰────
help: Try inserting a semicolon here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern-invalid-method-in-pattern/input.js:1:14]
1 │ ({get a(){}}) => 0;
· ▲
╰────
help: Try inserting a semicolon here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern-invalid-nested-param/input.js:1:51]
1 │ ([[[[[[[[[[[[[[[[[[[[{a:b[0]}]]]]]]]]]]]]]]]]]]]])=>0;
· ▲
╰────
help: Try inserting a semicolon here
× Expected `,` or `)` but found `=>`
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/object-binding-pattern-invalid-pattern-without-parenthesis/input.js:1:4]
1 │ ({}=>0)
· ┬ ─┬
· │ ╰── `,` or `)` expected
· ╰── Opened here
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/param-with-rest-without-arrow/input.js:1:5]
1 │ (b, ...a) + 1
· ───
╰────
× Expected `=>` but found `+`
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/rest-without-arrow/input.js:1:8]
1 │ (...a) + 1
· ┬
· ╰── `=>` expected
╰────
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-class/invalid-eval-in-class-method-params/input.js:1:12]
1 │ class A {a(eval){}}
· ────
╰────
note: Classes are always strict mode code
× Invalid assignment in object literal
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-destructuring-assignment/invalid-cover-grammar/input.js:1:22]
1 │ [[[[[[[[[[[[[[[[[[[[{a=b}]]]]]]]]]]]]]]]]]]]]
· ───
╰────
help: Did you mean to use a ':'? An '=' can only follow a property name when the containing object literal is part of a destructuring pattern.
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-destructuring-assignment/invalid-group-assignment/input.js:1:2]
1 │ (a,b)=(c,d);
· ───
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/invalid-lhs-01/input.js:1:5]
1 │ ({a:this}=0)
· ────
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/invalid-lhs-02/input.js:1:6]
1 │ ({a: this} = 0);
· ────
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-destructuring-assignment-object-pattern/invalid-pattern-with-method/input.js:1:4]
1 │ ({a(){}}=0)
· ────
╰────
× Expected `from` but found `EOF`
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/invalid-export-batch-missing-from-clause/input.js:2:1]
1 │ export *
╰────
× Expected `from` but found `+`
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/invalid-export-batch-token/input.js:1:10]
1 │ export * +
· ┬
· ╰── `from` expected
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/invalid-export-default/input.js:1:20]
1 │ export default from "foo"
· ▲
╰────
help: Try inserting a semicolon here
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/invalid-export-default-equal/input.js:1:16]
1 │ export default = 42
· ─
╰────
× A reserved word cannot be used as an exported binding without `from`
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/invalid-export-default-token/input.js:1:9]
1 │ export {default} +
· ───────
╰────
help: Did you mean `export { default as default } from 'some-module'`?
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/invalid-export-default-token/input.js:1:17]
1 │ export {default} +
· ▲
╰────
help: Try inserting a semicolon here
× A reserved word cannot be used as an exported binding without `from`
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/invalid-export-named-default/input.js:1:9]
1 │ export {default}
· ───────
╰────
help: Did you mean `export { default as default } from 'some-module'`?
× Export 'default' is not defined
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/invalid-export-named-default/input.js:1:9]
1 │ export {default}
· ───────
╰────
× for-of loop variable declaration may not have an initializer
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-for-of/invalid-const-init/input.js:1:6]
1 │ for (const x = 1 of y);
· ───────────
╰────
× for-of loop variable declaration may not have an initializer
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-for-of/invalid-let-init/input.js:1:6]
1 │ for (let x = 1 of y);
· ─────────
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-for-of/invalid-lhs-init/input.js:1:6]
1 │ for (this of that);
· ────
╰────
× for-of loop variable declaration may not have an initializer
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-for-of/invalid-var-init/input.js:1:6]
1 │ for (var x = 1 of y);
· ─────────
╰────
× Expected `;` but found `decimal`
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-for-of/unexpected-number/input.js:1:15]
1 │ for (const of 42);
· ─┬
· ╰── `;` expected
╰────
× A 'yield' expression is only allowed in a generator body.
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-generator/generator-method-with-invalid-computed-name/input.js:1:6]
1 │ ({ *[yield iter]() {} })
· ─────
╰────
help: Either remove this `yield` or change the enclosing function to a generator function (`function*`)
× Expected function name
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-generator/generator-parameter-binding-element/input.js:2:13]
1 │ (function*() {
2 │ function(x = yield 3) {}
· ─
3 │ })
╰────
help: Function name is required in function declaration or named export
× A 'yield' expression is only allowed in a generator body.
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-generator/generator-parameter-binding-element/input.js:2:18]
1 │ (function*() {
2 │ function(x = yield 3) {}
· ─────
3 │ })
╰────
help: Either remove this `yield` or change the enclosing function to a generator function (`function*`)
× yield expression not allowed in formal parameter
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-generator/generator-parameter-binding-element/input.js:2:18]
1 │ (function*() {
2 │ function(x = yield 3) {}
· ───┬───
· ╰── yield expression not allowed in formal parameter
3 │ })
╰────
× Expected function name
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-generator/generator-parameter-binding-property/input.js:2:13]
1 │ (function*() {
2 │ function({x: y = yield 3}) {}
· ─
3 │ })
╰────
help: Function name is required in function declaration or named export
× A 'yield' expression is only allowed in a generator body.
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-generator/generator-parameter-binding-property/input.js:2:22]
1 │ (function*() {
2 │ function({x: y = yield 3}) {}
· ─────
3 │ })
╰────
help: Either remove this `yield` or change the enclosing function to a generator function (`function*`)
× yield expression not allowed in formal parameter
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-generator/generator-parameter-binding-property/input.js:2:22]
1 │ (function*() {
2 │ function({x: y = yield 3}) {}
· ───┬───
· ╰── yield expression not allowed in formal parameter
3 │ })
╰────
× Cannot use `yield` as an identifier in a generator context
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-generator/generator-parameter-binding-property-reserved/input.js:1:13]
1 │ (function*({yield}) {})
· ─────
╰────
× Expected function name
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-generator/generator-parameter-computed-property-name/input.js:2:13]
1 │ (function*() {
2 │ function({[yield 3]: y}) {}
· ─
3 │ })
╰────
help: Function name is required in function declaration or named export
× A 'yield' expression is only allowed in a generator body.
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-generator/generator-parameter-computed-property-name/input.js:2:16]
1 │ (function*() {
2 │ function({[yield 3]: y}) {}
· ─────
3 │ })
╰────
help: Either remove this `yield` or change the enclosing function to a generator function (`function*`)
× yield expression not allowed in formal parameter
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-generator/generator-parameter-computed-property-name/input.js:2:16]
1 │ (function*() {
2 │ function({[yield 3]: y}) {}
· ───┬───
· ╰── yield expression not allowed in formal parameter
3 │ })
╰────
× Expected function name
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-generator/generator-parameter-invalid-binding-element/input.js:2:14]
1 │ (function*() {
2 │ function*(x = yield 3) {}
· ─
3 │ })
╰────
help: Function name is required in function declaration or named export
× yield expression not allowed in formal parameter
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-generator/generator-parameter-invalid-binding-element/input.js:2:19]
1 │ (function*() {
2 │ function*(x = yield 3) {}
· ───┬───
· ╰── yield expression not allowed in formal parameter
3 │ })
╰────
× Expected function name
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-generator/generator-parameter-invalid-binding-property/input.js:2:14]
1 │ (function*() {
2 │ function*({x: y = yield 3}) {}
· ─
3 │ })
╰────
help: Function name is required in function declaration or named export
× yield expression not allowed in formal parameter
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-generator/generator-parameter-invalid-binding-property/input.js:2:23]
1 │ (function*() {
2 │ function*({x: y = yield 3}) {}
· ───┬───
· ╰── yield expression not allowed in formal parameter
3 │ })
╰────
× Expected function name
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-generator/generator-parameter-invalid-computed-property-name/input.js:2:14]
1 │ (function*() {
2 │ function*({[yield 3]: y}) {}
· ─
3 │ })
╰────
help: Function name is required in function declaration or named export
× yield expression not allowed in formal parameter
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-generator/generator-parameter-invalid-computed-property-name/input.js:2:17]
1 │ (function*() {
2 │ function*({[yield 3]: y}) {}
· ───┬───
· ╰── yield expression not allowed in formal parameter
3 │ })
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-generator/incomplete-yield-delegate/input.js:1:23]
1 │ (function*() { yield* })
· ─
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-generator/malformed-generator-method/input.js:1:6]
1 │ ({ * })
· ─
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-generator/malformed-generator-method-2/input.js:1:15]
1 │ class Foo { * }
· ─
╰────
× Invalid Unicode escape sequence
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-identifier/invalid_escaped_surrogate_pairs/input.js:1:6]
1 │ var \uD83B\uDE00
· ───────────
╰────
× Cannot use export statement outside a module
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-identifier/invalid_expression_await/input.js:1:1]
1 │ export var answer = await + 1;
· ──────
╰────
× Invalid Character `🀒`
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-identifier/invalid_id_smp/input.js:1:5]
1 │ var 🀒
· ─
╰────
× Invalid Unicode escape sequence
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-identifier/invalid_lone_surrogate/input.js:1:2]
1 │ \uD800!
· ─────
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-identifier/invalid_lone_surrogate/input.js:1:7]
1 │ \uD800!
· ▲
╰────
help: Try inserting a semicolon here
× Cannot use export statement outside a module
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-identifier/invalid_var_await/input.js:1:1]
1 │ export var await;
· ──────
╰────
× Expected `from` but found `default`
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-import-declaration/invalid-import-default/input.js:1:8]
1 │ import default from "foo"
· ───┬───
· ╰── `from` expected
╰────
× Expected `from` but found `,`
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-import-declaration/invalid-import-default-after-named/input.js:1:13]
1 │ import {bar}, foo from "foo"
· ┬
· ╰── `from` expected
╰────
× Expected `from` but found `,`
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-import-declaration/invalid-import-default-after-named-after-default/input.js:1:18]
1 │ import foo, {bar}, foo from "foo";
· ┬
· ╰── `from` expected
╰────
× Expected `from` but found `EOF`
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-import-declaration/invalid-import-default-missing-module-specifier/input.js:2:1]
1 │ import foo
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-import-declaration/invalid-import-default-module-specifier/input.js:1:17]
1 │ import foo from bar;
· ───
╰────
× Expected `from` but found `{`
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-import-declaration/invalid-import-missing-comma/input.js:1:12]
1 │ import foo { bar } from "bar";
· ┬
· ╰── `from` expected
╰────
× Expected `from` but found `EOF`
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-import-declaration/invalid-import-missing-module-specifier/input.js:2:1]
1 │ import { foo, bar }
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-import-declaration/invalid-import-module-specifier/input.js:1:19]
1 │ export {foo} from bar
· ───
╰────
× Expected `from` but found `,`
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-import-declaration/invalid-import-named-after-named/input.js:1:13]
1 │ import {bar}, {foo} from "foo";
· ┬
· ╰── `from` expected
╰────
× Expected `from` but found `,`
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-import-declaration/invalid-import-named-after-namespace/input.js:1:16]
1 │ import * as foo, {bar} from "foo";
· ┬
· ╰── `from` expected
╰────
× Expected `from` but found `EOF`
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-import-declaration/invalid-import-named-as-missing-from/input.js:2:1]
1 │ import {default as foo}
╰────
× Expected `from` but found `,`
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-import-declaration/invalid-import-namespace-after-named/input.js:1:13]
1 │ import {bar}, * as foo from "foo";
· ┬
· ╰── `from` expected
╰────
× Expected `as` but found `from`
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-import-declaration/invalid-import-namespace-missing-as/input.js:1:10]
1 │ import * from "foo"
· ──┬─
· ╰── `as` expected
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-import-declaration/invalid-import-specifiers/input.js:1:13]
1 │ import foo, from "bar";
· ────
╰────
× Missing initializer in destructuring declaration
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-lexical-declaration/invalid_complex_binding_without_init/input.js:1:5]
1 │ let []
· ──
╰────
help: Add an initializer (e.g. ` = undefined`) here
× for-in loop variable declaration may not have an initializer
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-lexical-declaration/invalid_const_forin/input.js:1:6]
1 │ for (const x = 0 in y){}
· ───────────
╰────
× for-in loop variable declaration may not have an initializer
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-lexical-declaration/invalid_let_forin/input.js:1:6]
1 │ for (let x = 0 in y){}
· ─────────
╰────
× The only valid meta property for new is new.target
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-meta-property/invalid-dots/input.js:1:26]
1 │ var x = function() { y = new..target; }
· ─────
╰────
× Unexpected new.target expression
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-meta-property/invalid-new-target/input.js:1:9]
1 │ var x = new.target;
· ──────────
╰────
help: new.target is only allowed in constructors, functions, and class field initializers
× The only valid meta property for new is new.target
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-meta-property/unknown-property/input.js:1:22]
1 │ var f = function() { new.unknown_property; }
· ────────────────────
╰────
× Identifier `__proto__` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-getter-literal-identifier/input.js:1:21]
1 │ ({ get __proto(){}, "__proto__": null, __proto__: null, })
· ─────┬───── ────┬────
· │ ╰── It can not be redeclared here
· ╰── `__proto__` has already been declared here
╰────
× Identifier `__proto__` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-identifier-literal/input.js:1:4]
1 │ ({ __proto__: null, "__proto__": null })
· ────┬──── ─────┬─────
· │ ╰── It can not be redeclared here
· ╰── `__proto__` has already been declared here
╰────
× Identifier `__proto__` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-identifiers/input.js:1:4]
1 │ ({ __proto__: null, __proto__: null })
· ────┬──── ────┬────
· │ ╰── It can not be redeclared here
· ╰── `__proto__` has already been declared here
╰────
× Identifier `__proto__` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-literal-identifier/input.js:1:4]
1 │ ({ "__proto__": null, __proto__: null })
· ─────┬───── ────┬────
· │ ╰── It can not be redeclared here
· ╰── `__proto__` has already been declared here
╰────
× Identifier `__proto__` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-literals/input.js:1:4]
1 │ ({ "__proto__": null, '__proto__': null })
· ─────┬───── ─────┬─────
· │ ╰── It can not be redeclared here
· ╰── `__proto__` has already been declared here
╰────
× Identifier `__proto__` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-setter-literal-identifier/input.js:1:24]
1 │ ({ set __proto__(x){}, "__proto__": null, __proto__: null, })
· ─────┬───── ────┬────
· │ ╰── It can not be redeclared here
· ╰── `__proto__` has already been declared here
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-spread-element/invalid-call-dot-dot/input.js:1:3]
1 │ f(..g);
· ─
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-spread-element/invalid-call-dots/input.js:1:6]
1 │ f(....g);
· ─
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-spread-element/invalid-call-spreads/input.js:1:7]
1 │ f(... ... g);
· ───
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-spread-element/invalid-new-dot-dot/input.js:1:7]
1 │ new f(..g);
· ─
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-spread-element/invalid-new-dots/input.js:1:10]
1 │ new f(....g);
· ─
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-spread-element/invalid-new-spreads/input.js:1:11]
1 │ new f(... ... g);
· ───
╰────
× 'super' can only be used with function calls or in property accesses
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-super-property/invalid_super_access/input.js:3:10]
2 │ constructor() {
3 │ (super)();
· ─────
4 │ }
╰────
help: Replace with `super()` or `super.prop` or `super[prop]`
× 'super' can only be used with function calls or in property accesses
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-super-property/invalid_super_id/input.js:2:17]
1 │ class A {
2 │ foo() { new super + 3 }
· ─────
3 │ }
╰────
help: Replace with `super()` or `super.prop` or `super[prop]`
× 'new super()' is not allowed
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-super-property/invalid_super_id/input.js:2:17]
1 │ class A {
2 │ foo() { new super + 3 }
· ─────
3 │ }
╰────
× TS(2337): Super calls are not permitted outside constructors or in nested functions inside constructors.
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-super-property/invalid_super_id/input.js:2:13]
1 │ class A {
2 │ foo() { new super + 3 }
· ─────────
3 │ }
╰────
× TS(2337): Super calls are not permitted outside constructors or in nested functions inside constructors.
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-super-property/invalid_super_not_inside_function/input.js:1:9]
1 │ var x = super();
· ───────
╰────
× Expected `(` but found `${}`
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-template-literals/after-switch/input.js:1:8]
1 │ switch `test`
· ───┬──
· ╰── `(` expected
╰────
× Bad escape sequence in untagged template literal
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-template-literals/invalid-escape/input.js:1:2]
1 │ `\1`;
· ──
╰────
× Bad escape sequence in untagged template literal
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-template-literals/invalid-octal-literal/input.js:1:2]
1 │ `\00`;
· ───
╰────
× Bad escape sequence in untagged template literal
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-template-literals/invalid-strict-octal-literal/input.js:1:16]
1 │ 'use strict'; `\00`;
· ───
╰────
× Unterminated string
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-template-literals/unclosed/input.js:1:1]
1 │ `test
· ──────
╰────
× Expected `}` but found `;`
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-template-literals/unclosed-interpolation/input.js:1:12]
1 │ `hello ${10;test`
· ┬
· ╰── `}` expected
╰────
× Expected `}` but found `EOF`
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-template-literals/unclosed-nested/input.js:2:1]
1 │ `hello ${10 `test`
╰────
× A 'yield' expression is only allowed in a generator body.
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-binding-property/input.js:1:13]
1 │ var {x: y = yield 3} = z;
· ─────
╰────
help: Either remove this `yield` or change the enclosing function to a generator function (`function*`)
× A 'yield' expression is only allowed in a generator body.
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-expression/input.js:1:15]
1 │ (function() { yield 3; })
· ─────
╰────
help: Either remove this `yield` or change the enclosing function to a generator function (`function*`)
× yield expression not allowed in formal parameter
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-generator-arrow-default/input.js:1:22]
1 │ function* g() { (x = yield 42) => {} }
· ────┬───
· ╰── yield expression not allowed in formal parameter
╰────
× Cannot use `yield` as an identifier in a generator context
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-generator-arrow-parameter/input.js:1:17]
1 │ function *g(){ (yield) => 42 }
· ─────
╰────
× Cannot use `yield` as an identifier in a generator context
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-generator-arrow-parameters/input.js:1:26]
1 │ function *g(){ (a, b, c, yield) => 42 }
· ─────
╰────
× Cannot use `yield` as an identifier in a generator context
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-generator-catch/input.js:1:31]
1 │ function *g() { try {} catch (yield) {} }
· ─────
╰────
× Cannot use `yield` as an identifier in a generator context
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-generator-declaration/input.js:1:27]
1 │ function *g() { function *yield(){} }
· ─────
╰────
× The keyword 'yield' is reserved
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-generator-export-default/input.js:1:26]
1 │ export default function *yield() {}
· ─────
╰────
note: Modules are always strict mode code
× Cannot use `yield` as an identifier in a generator context
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-generator-expression-name/input.js:1:11]
1 │ (function*yield(){})
· ─────
╰────
× Cannot use `yield` as an identifier in a generator context
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-generator-expression-parameter/input.js:1:13]
1 │ (function *(yield){})
· ─────
╰────
× Cannot use `yield` as an identifier in a generator context
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-generator-expression-rest/input.js:1:19]
1 │ (function *(x, ...yield){})
· ─────
╰────
× Cannot use `yield` as an identifier in a generator context
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-generator-function-declaration/input.js:1:26]
1 │ function *g() { function yield() {} }
· ─────
╰────
× Cannot use `yield` as an identifier in a generator context
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-generator-lexical-declaration/input.js:1:21]
1 │ function *g() { let yield; }
· ─────
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-generator-member-expression/input.js:1:29]
1 │ function *g() { return yield.x; }
· ─
╰────
× Cannot use `yield` as an identifier in a generator context
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-generator-parameter/input.js:1:13]
1 │ function *g(yield){}
· ─────
╰────
× Cannot use `yield` as an identifier in a generator context
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-generator-rest/input.js:1:25]
1 │ function *g(a, b, c, ...yield){}
· ─────
╰────
× The keyword 'yield' is reserved
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-generator-strict-function-expression/input.js:1:47]
1 │ "use strict"; function *g(){ var y = function yield(){}; }
· ─────
╰────
note: This identifier is reserved in strict mode code
× The keyword 'yield' is reserved
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-generator-strict-function-parameter/input.js:1:48]
1 │ "use strict"; function *g() { var z = function(yield) {} }
· ─────
╰────
note: This identifier is reserved in strict mode code
× Cannot use `yield` as an identifier in a generator context
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-generator-variable-declaration/input.js:1:21]
1 │ function *g() { var yield; }
· ─────
╰────
× The keyword 'yield' is reserved
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-array-pattern/input.js:1:17]
1 │ "use strict"; ([yield] = x)
· ─────
╰────
note: This identifier is reserved in strict mode code
× The keyword 'yield' is reserved
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-arrow-parameter-default/input.js:1:20]
1 │ "use strict"; (x = yield) => {}
· ─────
╰────
note: This identifier is reserved in strict mode code
× The keyword 'yield' is reserved
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-arrow-parameter-name/input.js:1:16]
1 │ "use strict"; (yield) => 42
· ─────
╰────
note: This identifier is reserved in strict mode code
× The keyword 'yield' is reserved
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-binding-element/input.js:1:24]
1 │ "use strict"; var { x: yield } = foo;
· ─────
╰────
note: This identifier is reserved in strict mode code
× The keyword 'yield' is reserved
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-catch-parameter/input.js:1:29]
1 │ "use strict"; try {} catch (yield) {}
· ─────
╰────
note: This identifier is reserved in strict mode code
× The keyword 'yield' is reserved
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-formal-parameter/input.js:1:26]
1 │ "use strict"; function f(yield) {}
· ─────
╰────
note: This identifier is reserved in strict mode code
× The keyword 'yield' is reserved
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-function-declaration/input.js:1:10]
1 │ function yield(){ "use strict"; }
· ─────
╰────
note: This identifier is reserved in strict mode code
× The keyword 'yield' is reserved
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-function-expression/input.js:1:11]
1 │ (function yield(){ "use strict"; })
· ─────
╰────
note: This identifier is reserved in strict mode code
× The keyword 'yield' is reserved
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-identifier/input.js:1:30]
1 │ "use strict"; function f() { yield }
· ─────
╰────
note: This identifier is reserved in strict mode code
× The keyword 'yield' is reserved
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-lexical-declaration/input.js:1:19]
1 │ "use strict"; let yield = 42;
· ─────
╰────
note: This identifier is reserved in strict mode code
× The keyword 'yield' is reserved
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-rest-parameter/input.js:1:29]
1 │ "use strict"; function f(...yield) {}
· ─────
╰────
note: This identifier is reserved in strict mode code
× The keyword 'yield' is reserved
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-strict-variable-declaration/input.js:1:19]
1 │ "use strict"; var yield;
· ─────
╰────
note: This identifier is reserved in strict mode code
× yield expression not allowed in formal parameter
╭─[babel/packages/babel-parser/test/fixtures/esprima/es2015-yield/yield-generator-arrow-default/input.js:1:22]
1 │ function *g() { (x = yield) => {} }
· ──┬──
· ╰── yield expression not allowed in formal parameter
╰────
× Invalid Character ` `
╭─[babel/packages/babel-parser/test/fixtures/esprima/expression-primary-array/migrated_0012/input.js:1:19]
1 │ \u2163\u2161\u200A
· ▲
╰────
× Invalid escape sequence
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/GH-1106-00/input.js:1:2]
1 │ "\x";
· ──
╰────
× Invalid escape sequence
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/GH-1106-01/input.js:1:2]
1 │ "\x0";
· ───
╰────
× Invalid escape sequence
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/GH-1106-02/input.js:1:2]
1 │ "\xx";
· ──
╰────
× Invalid escape sequence
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/GH-1106-03/input.js:1:2]
1 │ "\u";
· ──
╰────
× Invalid escape sequence
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/GH-1106-04/input.js:1:2]
1 │ "\u0";
· ───
╰────
× Invalid escape sequence
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/GH-1106-05/input.js:1:2]
1 │ "\ux";
· ──
╰────
× Invalid escape sequence
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/GH-1106-06/input.js:1:2]
1 │ "\u00";
· ────
╰────
× Invalid escape sequence
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/GH-1106-07/input.js:1:2]
1 │ "\u000";
· ─────
╰────
× Invalid escape sequence
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/GH-1106-09/input.js:1:1]
1 │ "\9";
· ────
╰────
help: \8 and \9 are not allowed in strict mode
× Expected `}` but found `EOF`
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0000/input.js:2:1]
1 │ {
· ┬
· ╰── Opened here
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0001/input.js:1:1]
1 │ }
· ─
╰────
× Invalid Character `a`
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0002/input.js:1:3]
1 │ 3ea
· ▲
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0002/input.js:1:3]
1 │ 3ea
· ─
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0003/input.js:1:2]
1 │ 3in []
· ──
╰────
× Invalid Character `
│ `
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0004/input.js:1:3]
1 │ 3e
· ▲
╰────
× Invalid Character `
│ `
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0005/input.js:1:4]
1 │ 3e+
· ▲
╰────
× Invalid Character `
│ `
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0006/input.js:1:4]
1 │ 3e-
· ▲
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0007/input.js:1:2]
1 │ 3x
· ─
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0008/input.js:1:2]
1 │ 3x0
· ─
╰────
× Invalid Character `
│ `
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0009/input.js:1:3]
1 │ 0x
· ▲
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0010/input.js:1:3]
1 │ 01a
· ─
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0011/input.js:1:4]
1 │ 0o1a
· ─
╰────
× Invalid Character `
│ `
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0012/input.js:1:3]
1 │ 0o
· ▲
╰────
× Invalid Character `
│ `
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0013/input.js:1:3]
1 │ 0O
· ▲
╰────
× Invalid Character `9`
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0014/input.js:1:3]
1 │ 0o9
· ▲
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0015/input.js:1:4]
1 │ 0o18
· ─
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0016/input.js:1:4]
1 │ 0O1a
· ─
╰────
× Invalid Character `
│ `
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0017/input.js:1:3]
1 │ 0b
· ▲
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0018/input.js:1:4]
1 │ 0b1a
· ─
╰────
× Invalid Character `9`
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0019/input.js:1:3]
1 │ 0b9
· ▲
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0020/input.js:1:4]
1 │ 0b18
· ─
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0021/input.js:1:4]
1 │ 0b12
· ─
╰────
× Invalid Character `
│ `
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0022/input.js:1:3]
1 │ 0B
· ▲
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0023/input.js:1:4]
1 │ 0B1a
· ─
╰────
× Invalid Character `9`
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0024/input.js:1:3]
1 │ 0B9
· ▲
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0025/input.js:1:4]
1 │ 0B18
· ─
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0026/input.js:1:4]
1 │ 0B12
· ─
╰────
× Invalid Character `9`
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0027/input.js:1:3]
1 │ 0O9
· ▲
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0028/input.js:1:4]
1 │ 0O18
· ─
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0029/input.js:1:2]
1 │ 3in[]
· ──
╰────
× Invalid characters after number
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0030/input.js:1:4]
1 │ 0x3in[]
· ──
╰────
× Unterminated string
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0031/input.js:1:1]
1 │ "Hello
· ───────
2 │ World"
╰────
× Invalid Unicode escape sequence
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0032/input.js:1:3]
1 │ x\
· ─
╰────
× Invalid Character `\`
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0033/input.js:1:8]
1 │ x\u005c
· ▲
╰────
× Invalid Character `*`
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0034/input.js:1:8]
1 │ x\u002a
· ▲
╰────
× Invalid Unicode escape sequence
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0036/input.js:1:3]
1 │ a\u
· ─
╰────
× Invalid Unicode escape sequence
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0037/input.js:1:2]
1 │ \ua
· ──
╰────
× Unterminated regular expression
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0038/input.js:1:1]
1 │ /
· ──
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0038/input.js:1:1]
1 │ /
· ──
╰────
× Unterminated regular expression
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0039/input.js:1:1]
1 │ /test
· ──────
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0039/input.js:1:1]
1 │ /test
· ──────
╰────
× Unterminated regular expression
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0040/input.js:1:1]
1 │ /test
· ──────
2 │ /
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0040/input.js:1:1]
1 │ ╭─▶ /test
2 │ ╰─▶ /
╰────
× Invalid Unicode escape sequence
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0041/input.js:1:17]
1 │ var x = /[a-z]/\ux
· ─
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0041/input.js:1:16]
1 │ var x = /[a-z]/\ux
· ▲
╰────
help: Try inserting a semicolon here
× Invalid Unicode escape sequence
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0042/input.js:1:19]
1 │ var x = /[a-z\n]/\ux
· ─
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0042/input.js:1:18]
1 │ var x = /[a-z\n]/\ux
· ▲
╰────
help: Try inserting a semicolon here
× Invalid Unicode escape sequence
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0043/input.js:1:17]
1 │ var x = /[a-z]/\\ux
· ─
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0043/input.js:1:16]
1 │ var x = /[a-z]/\\ux
· ▲
╰────
help: Try inserting a semicolon here
× Invalid Unicode escape sequence
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0044/input.js:1:18]
1 │ var x = /[P QR]/\\u0067
· ─
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0044/input.js:1:17]
1 │ var x = /[P QR]/\\u0067
· ▲
╰────
help: Try inserting a semicolon here
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0045/input.js:1:1]
1 │ 3 = 4
· ─
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0046/input.js:1:1]
1 │ func() = 4
· ──────
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0047/input.js:1:2]
1 │ (1 + 1) = 10
· ─────
╰────
× Invalid Unicode escape sequence
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0048/input.js:1:2]
1 │ \u{110000}
· ────────
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0048/input.js:1:10]
1 │ \u{110000}
· ─
╰────
× Invalid Unicode escape sequence
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0049/input.js:1:2]
1 │ \u{}
· ──
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0049/input.js:1:4]
1 │ \u{}
· ─
╰────
× Invalid Unicode escape sequence
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0050/input.js:1:2]
1 │ \u{FFFF
· ──────
╰────
× Invalid Unicode escape sequence
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0051/input.js:1:2]
1 │ \u{FFZ}
· ────
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0051/input.js:1:7]
1 │ \u{FFZ}
· ─
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0052/input.js:1:1]
1 │ 1++
· ─
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0053/input.js:1:1]
1 │ 1--
· ─
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0054/input.js:1:3]
1 │ ++1
· ─
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0055/input.js:1:3]
1 │ --1
· ─
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0056/input.js:1:6]
1 │ for((1 + 1) in list) process(x);
· ─────
╰────
× Expected `]` but found `EOF`
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0057/input.js:2:1]
1 │ [
╰────
× Expected `]` but found `EOF`
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0058/input.js:2:1]
1 │ [,
╰────
× Expected `}` but found `EOF`
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0059/input.js:2:1]
1 │ 1 + {
╰────
× Expected `}` but found `EOF`
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0060/input.js:2:1]
1 │ 1 + { t:t
╰────
× Expected `}` but found `EOF`
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0061/input.js:2:1]
1 │ 1 + { t:t,
╰────
× Unterminated regular expression
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0062/input.js:1:9]
1 │ var x = /
· ──
2 │ /
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0062/input.js:1:9]
1 │ ╭─▶ var x = /
2 │ ╰─▶ /
╰────
× Unterminated string
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0063/input.js:1:9]
1 │ var x = "
· ──
╰────
× Identifier expected. 'if' is a reserved word that cannot be used here.
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0064/input.js:1:5]
1 │ var if = 42
· ──
╰────
× Invalid Character `=`
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0065/input.js:1:4]
1 │ i #= 42
· ─
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0066/input.js:1:1]
1 │ i + 2 = 42
· ─────
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0067/input.js:1:1]
1 │ +i = 42
· ──
╰────
× Expected `)` but found `EOF`
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0068/input.js:2:1]
1 │ 1 + (
╰────
× Expected `}` but found `EOF`
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0069/input.js:2:1]
1 │ {
· ┬
· ╰── Opened here
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0070/input.js:3:1]
2 │ comment */
3 │ )
· ─
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0071/input.js:1:6]
1 │ { set 1 }
· ▲
╰────
help: Try inserting a semicolon here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0072/input.js:1:6]
1 │ { get 2 }
· ▲
╰────
help: Try inserting a semicolon here
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0073/input.js:1:11]
1 │ ({ set: s(if) { } })
· ──
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0074/input.js:1:10]
1 │ ({ set s(.) { } })
· ─
╰────
× TS(1049): A 'set' accessor must have exactly one parameter.
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0075/input.js:1:9]
1 │ ({ set s() { } })
· ──
╰────
help: Add a parameter here
× Expected `,` or `}` but found `{`
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0076/input.js:1:13]
1 │ ({ set: s() { } })
· ┬ ┬
· │ ╰── `,` or `}` expected
· ╰── Opened here
╰────
× Expected `,` or `}` but found `{`
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0077/input.js:1:17]
1 │ ({ set: s(a, b) { } })
· ┬ ┬
· │ ╰── `,` or `}` expected
· ╰── Opened here
╰────
× Expected `,` or `}` but found `{`
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0078/input.js:1:14]
1 │ ({ get: g(d) { } })
· ┬ ┬
· │ ╰── `,` or `}` expected
· ╰── Opened here
╰────
× Expected `]` but found `,`
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0080/input.js:1:5]
1 │ ({[a,b]:0})
· ┬
· ╰── `]` expected
╰────
× Expected `]` but found `,`
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0081/input.js:1:8]
1 │ ({get[a,b]:0})
· ┬
· ╰── `]` expected
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0082/input.js:1:3]
1 │ ({(a):0})
· ─
╰────
× Expected `,` or `}` but found `{`
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0083/input.js:1:6]
1 │ ({get{a}:0})
· ┬ ┬
· │ ╰── `,` or `}` expected
· ╰── Opened here
╰────
× Expected `}` but found `EOF`
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0084/input.js:2:1]
1 │ ({get
╰────
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0087/input.js:1:16]
1 │ "use strict"; (eval = 10) => 42
· ────
╰────
note: This is strict mode code
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0088/input.js:1:15]
1 │ "use strict"; eval => 42
· ────
╰────
note: This is strict mode code
× Cannot assign to 'arguments' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0089/input.js:1:15]
1 │ "use strict"; arguments => 42
· ─────────
╰────
note: This is strict mode code
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0090/input.js:1:16]
1 │ "use strict"; (eval, a) => 42
· ────
╰────
note: This is strict mode code
× Cannot assign to 'arguments' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0091/input.js:1:16]
1 │ "use strict"; (arguments, a) => 42
· ─────────
╰────
note: This is strict mode code
× Identifier `a` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0092/input.js:1:2]
1 │ (a, a) => 42
· ┬ ┬
· │ ╰── It can not be redeclared here
· ╰── `a` has already been declared here
╰────
× Identifier `a` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0093/input.js:1:16]
1 │ "use strict"; (a, a) => 42
· ┬ ┬
· │ ╰── It can not be redeclared here
· ╰── `a` has already been declared here
╰────
× '0'-prefixed octal literals and octal escape sequences are deprecated
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0094/input.js:1:22]
1 │ "use strict"; (a) => 00
· ──
╰────
help: for octal literals use the '0o' prefix instead
× Empty parenthesized expression
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0095/input.js:1:1]
1 │ () <= 42
· ──
╰────
× Empty parenthesized expression
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0096/input.js:1:1]
1 │ () ? 42
· ──
╰────
× Empty parenthesized expression
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0097/input.js:1:1]
1 │ () + 42
· ──
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0098/input.js:1:5]
1 │ (10) => 00
· ▲
╰────
help: Try inserting a semicolon here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0099/input.js:1:9]
1 │ (10, 20) => 00
· ▲
╰────
help: Try inserting a semicolon here
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0100/input.js:1:16]
1 │ "use strict"; (eval) => 42
· ────
╰────
note: This is strict mode code
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0101/input.js:1:2]
1 │ (eval) => { "use strict"; 42 }
· ────
╰────
note: This is strict mode code
× Expected `,` or `}` but found `/`
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0102/input.js:1:8]
1 │ p = { q/ }
· ┬ ┬
· │ ╰── `,` or `}` expected
· ╰── Opened here
╰────
× Expected `:` but found `/`
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0103/input.js:1:10]
1 │ p = { "q"/ }
· ┬
· ╰── `:` expected
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0112/input.js:1:2]
1 │ a b;
· ▲
╰────
help: Try inserting a semicolon here
× Expected `(` but found `.`
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0113/input.js:1:3]
1 │ if.a;
· ┬
· ╰── `(` expected
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0114/input.js:1:2]
1 │ a if;
· ▲
╰────
help: Try inserting a semicolon here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0115/input.js:1:2]
1 │ a enum;
· ▲
╰────
help: Try inserting a semicolon here
× Illegal break statement
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0116/input.js:1:1]
1 │ break
· ─────
╰────
help: A `break` statement can only be used within an enclosing iteration or switch statement.
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0117/input.js:1:7]
1 │ break 1;
· ─
╰────
× Illegal continue statement: no surrounding iteration statement
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0118/input.js:1:1]
1 │ continue
· ────────
╰────
help: A `continue` statement can only be used within an enclosing `for`, `while` or `do while`
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0119/input.js:1:10]
1 │ continue 2;
· ─
╰────
× Illegal newline after throw
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0120/input.js:1:1]
1 │ throw
· ──┬──
· ╰── throw starts here
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0120/input.js:2:1]
1 │ throw
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0121/input.js:1:6]
1 │ throw;
· ─
╰────
× Illegal newline after throw
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0122/input.js:1:1]
1 │ throw
· ──┬──
· ╰── throw starts here
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0122/input.js:2:1]
1 │ throw
╰────
× Only a single declaration is allowed in a `for...in` statement
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0123/input.js:1:6]
1 │ for (var i, i2 in {});
· ─────────
╰────
× Expected `;` but found `)`
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0124/input.js:1:15]
1 │ for ((i in {}));
· ┬
· ╰── `;` expected
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0125/input.js:1:6]
1 │ for (i + 1 in {});
· ─────
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0126/input.js:1:6]
1 │ for (+i in {});
· ──
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0127/input.js:2:1]
1 │ if(false)
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0128/input.js:2:1]
1 │ if(false) doThis(); else
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0129/input.js:2:1]
1 │ do
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0130/input.js:2:1]
1 │ while(false)
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0131/input.js:2:1]
1 │ for(;;)
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0132/input.js:2:1]
1 │ with(x)
╰────
× Missing catch or finally clause
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0133/input.js:1:8]
1 │ try { }
· ▲
╰────
help: Either unwrap this try block or add catch / finally clause
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0134/input.js:1:15]
1 │ try {} catch (42) {}
· ──
╰────
× Expected `)` but found `(`
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0135/input.js:1:21]
1 │ try {} catch (answer()) {}
· ┬
· ╰── `)` expected
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0136/input.js:1:15]
1 │ try {} catch (-x) {}
· ─
╰────
× Invalid Character `‿`
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0137/input.js:1:7]
1 │ \u203F = 10
· ▲
╰────
× Missing initializer in const declaration
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0138/input.js:1:15]
1 │ const x = 12, y;
· ─
╰────
help: Add an initializer (e.g. ` = undefined`) here
× Missing initializer in const declaration
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0139/input.js:1:7]
1 │ const x, y = 12;
· ─
╰────
help: Add an initializer (e.g. ` = undefined`) here
× Missing initializer in const declaration
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0140/input.js:1:7]
1 │ const x;
· ─
╰────
help: Add an initializer (e.g. ` = undefined`) here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0141/input.js:1:13]
1 │ if(true) let a = 1;
· ▲
╰────
help: Try inserting a semicolon here
× Lexical declaration cannot appear in a single-statement context
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0142/input.js:1:10]
1 │ if(true) const a = 1;
· ────────────
╰────
help: Wrap this declaration in a block statement
× TS(1113): A 'default' clause cannot appear more than once in a 'switch' statement.
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0143/input.js:1:14]
1 │ switch (c) { default: default: }
· ────┬─── ────┬───
· │ ╰── Another 'default' clause cannot appear here.
· ╰── First 'default' clause is here.
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0144/input.js:1:9]
1 │ new X()."s"
· ───
╰────
× Unterminated multiline comment
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0145/input.js:1:1]
1 │ /*
· ───
╰────
× Unterminated multiline comment
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0146/input.js:1:1]
1 │ /*
· ───
╰────
× Unterminated multiline comment
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0147/input.js:1:1]
1 │ /**
· ────
╰────
× Unterminated multiline comment
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0148/input.js:1:1]
1 │ ╭─▶ /*
2 │ │
3 │ ╰─▶ *
╰────
× Unterminated multiline comment
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0149/input.js:1:1]
1 │ /*hello
· ────────
╰────
× Unterminated multiline comment
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0150/input.js:1:1]
1 │ /*hello *
· ───────────
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0151/input.js:1:1]
1 │ ]
· ─
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0152/input.js:1:1]
1 │ ]
· ─
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0153/input.js:1:1]
1 │ ]
· ─
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0154/input.js:1:1]
1 │ ]
· ─
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0155/input.js:2:1]
1 │ //
2 │ ]
· ─
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0156/input.js:3:1]
2 │
]
· ─
╰────
× Unterminated regular expression
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0157/input.js:1:1]
1 │ /a\
· ────
2 │ /
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0157/input.js:1:1]
1 │ ╭─▶ /a\
2 │ ╰─▶ /
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0158/input.js:3:1]
2 │
3 │ ]
· ─
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0159/input.js:2:3]
1 │ /*
2 │ */]
· ─
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0160/input.js:3:3]
2 │
*/]
· ─
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0161/input.js:3:3]
2 │
3 │ */]
· ─
╰────
× Invalid Unicode escape sequence
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0162/input.js:1:2]
1 │ \
· ─
╰────
× Invalid Character `\`
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0163/input.js:1:7]
1 │ \u005c
· ▲
╰────
× Invalid Unicode escape sequence
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0164/input.js:1:2]
1 │ \x
· ─
╰────
× Invalid Character ``
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0165/input.js:1:7]
1 │ \u0000
· ▲
╰────
× Invalid Character `‌`
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0166/input.js:1:7]
1 │ \u200C = []
· ▲
╰────
× Invalid Character `‍`
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0167/input.js:1:7]
1 │ \u200D = []
· ▲
╰────
× Unterminated string
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0168/input.js:1:1]
1 │ "\
· ───
╰────
× Invalid escape sequence
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0169/input.js:1:2]
1 │ "\u
· ──
╰────
× Unterminated string
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0169/input.js:1:1]
1 │ "\u
· ────
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0170/input.js:1:15]
1 │ try { } catch() {}
· ─
╰────
× TS(1108): A 'return' statement can only be used within a function body.
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0171/input.js:1:1]
1 │ return
· ──────
╰────
× Illegal break statement
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0172/input.js:1:1]
1 │ break
· ─────
╰────
help: A `break` statement can only be used within an enclosing iteration or switch statement.
× Illegal continue statement: no surrounding iteration statement
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0173/input.js:1:1]
1 │ continue
· ────────
╰────
help: A `continue` statement can only be used within an enclosing `for`, `while` or `do while`
× Illegal continue statement: no surrounding iteration statement
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0174/input.js:1:23]
1 │ switch (x) { default: continue; }
· ─────────
╰────
help: A `continue` statement can only be used within an enclosing `for`, `while` or `do while`
× Expected `while` but found `*`
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0175/input.js:1:10]
1 │ do { x } *
· ┬
· ╰── `while` expected
╰────
× Use of undefined label
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0176/input.js:1:22]
1 │ while (true) { break x; }
· ─
╰────
× Use of undefined label
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0177/input.js:1:25]
1 │ while (true) { continue x; }
· ─
╰────
× Jump target cannot cross function boundary.
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0178/input.js:1:40]
1 │ x: while (true) { (function () { break x; }); }
· ─
╰────
× Jump target cannot cross function boundary.
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0179/input.js:1:43]
1 │ x: while (true) { (function () { continue x; }); }
· ─
╰────
× Illegal break statement
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0180/input.js:1:34]
1 │ x: while (true) { (function () { break; }); }
· ──────
╰────
help: A `break` statement can only be used within an enclosing iteration or switch statement.
× Illegal continue statement: no surrounding iteration statement
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0181/input.js:1:34]
1 │ x: while (true) { (function () { continue; }); }
· ─────────
╰────
help: A `continue` statement can only be used within an enclosing `for`, `while` or `do while`
× Label `x` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0182/input.js:1:1]
1 │ x: while (true) { x: while (true) { } }
· ┬ ┬
· │ ╰── It can not be redeclared here
· ╰── `x` has already been declared here
╰────
× Delete of an unqualified identifier in strict mode.
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0183/input.js:1:37]
1 │ (function () { 'use strict'; delete i; }())
· ─
╰────
× 'with' statements are not allowed
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0184/input.js:1:30]
1 │ (function () { 'use strict'; with (i); }())
· ────
╰────
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0185/input.js:1:37]
1 │ function hello() {'use strict'; var eval = 10; }
· ────
╰────
note: This is strict mode code
× Cannot assign to 'arguments' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0186/input.js:1:37]
1 │ function hello() {'use strict'; var arguments = 10; }
· ─────────
╰────
note: This is strict mode code
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0187/input.js:1:48]
1 │ function hello() {'use strict'; try { } catch (eval) { } }
· ────
╰────
note: This is strict mode code
× Cannot assign to 'arguments' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0188/input.js:1:48]
1 │ function hello() {'use strict'; try { } catch (arguments) { } }
· ─────────
╰────
note: This is strict mode code
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0189/input.js:1:33]
1 │ function hello() {'use strict'; eval = 10; }
· ────
╰────
note: This is strict mode code
× Cannot assign to 'arguments' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0190/input.js:1:33]
1 │ function hello() {'use strict'; arguments = 10; }
· ─────────
╰────
note: This is strict mode code
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0191/input.js:1:35]
1 │ function hello() {'use strict'; ++eval; }
· ────
╰────
note: This is strict mode code
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0192/input.js:1:35]
1 │ function hello() {'use strict'; --eval; }
· ────
╰────
note: This is strict mode code
× Cannot assign to 'arguments' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0193/input.js:1:35]
1 │ function hello() {'use strict'; ++arguments; }
· ─────────
╰────
note: This is strict mode code
× Cannot assign to 'arguments' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0194/input.js:1:35]
1 │ function hello() {'use strict'; --arguments; }
· ─────────
╰────
note: This is strict mode code
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0195/input.js:1:33]
1 │ function hello() {'use strict'; eval++; }
· ────
╰────
note: This is strict mode code
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0196/input.js:1:33]
1 │ function hello() {'use strict'; eval--; }
· ────
╰────
note: This is strict mode code
× Cannot assign to 'arguments' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0197/input.js:1:33]
1 │ function hello() {'use strict'; arguments++; }
· ─────────
╰────
note: This is strict mode code
× Cannot assign to 'arguments' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0198/input.js:1:33]
1 │ function hello() {'use strict'; arguments--; }
· ─────────
╰────
note: This is strict mode code
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0199/input.js:1:42]
1 │ function hello() {'use strict'; function eval() { } }
· ────
╰────
note: This is strict mode code
× Cannot assign to 'arguments' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0200/input.js:1:42]
1 │ function hello() {'use strict'; function arguments() { } }
· ─────────
╰────
note: This is strict mode code
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0201/input.js:1:10]
1 │ function eval() {'use strict'; }
· ────
╰────
note: This is strict mode code
× Cannot assign to 'arguments' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0202/input.js:1:10]
1 │ function arguments() {'use strict'; }
· ─────────
╰────
note: This is strict mode code
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0203/input.js:1:43]
1 │ function hello() {'use strict'; (function eval() { }()) }
· ────
╰────
note: This is strict mode code
× Cannot assign to 'arguments' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0204/input.js:1:43]
1 │ function hello() {'use strict'; (function arguments() { }()) }
· ─────────
╰────
note: This is strict mode code
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0205/input.js:1:11]
1 │ (function eval() {'use strict'; })()
· ────
╰────
note: This is strict mode code
× Cannot assign to 'arguments' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0206/input.js:1:11]
1 │ (function arguments() {'use strict'; })()
· ─────────
╰────
note: This is strict mode code
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0207/input.js:1:48]
1 │ function hello() {'use strict'; ({ s: function eval() { } }); }
· ────
╰────
note: This is strict mode code
× The keyword 'package' is reserved
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0208/input.js:1:11]
1 │ (function package() {'use strict'; })()
· ───────
╰────
note: This identifier is reserved in strict mode code
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0209/input.js:1:49]
1 │ function hello() {'use strict'; ({ i: 10, set s(eval) { } }); }
· ────
╰────
note: This is strict mode code
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0210/input.js:1:42]
1 │ function hello() {'use strict'; ({ set s(eval) { } }); }
· ────
╰────
note: This is strict mode code
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0211/input.js:1:50]
1 │ function hello() {'use strict'; ({ s: function s(eval) { } }); }
· ────
╰────
note: This is strict mode code
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0212/input.js:1:16]
1 │ function hello(eval) {'use strict';}
· ────
╰────
note: This is strict mode code
× Cannot assign to 'arguments' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0213/input.js:1:16]
1 │ function hello(arguments) {'use strict';}
· ─────────
╰────
note: This is strict mode code
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0214/input.js:1:49]
1 │ function hello() { 'use strict'; function inner(eval) {} }
· ────
╰────
note: This is strict mode code
× Cannot assign to 'arguments' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0215/input.js:1:49]
1 │ function hello() { 'use strict'; function inner(arguments) {} }
· ─────────
╰────
note: This is strict mode code
× '0'-prefixed octal literals and octal escape sequences are deprecated
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0216/input.js:1:1]
1 │ "\1"; 'use strict';
· ────
╰────
help: for octal literals use the '0o' prefix instead
× '0'-prefixed octal literals and octal escape sequences are deprecated
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0217/input.js:1:34]
1 │ function hello() { 'use strict'; "\1"; }
· ────
╰────
help: for octal literals use the '0o' prefix instead
× '0'-prefixed octal literals and octal escape sequences are deprecated
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0218/input.js:1:34]
1 │ function hello() { 'use strict'; 021; }
· ───
╰────
help: for octal literals use the '0o' prefix instead
× '0'-prefixed octal literals and octal escape sequences are deprecated
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0219/input.js:1:37]
1 │ function hello() { 'use strict'; ({ "\1": 42 }); }
· ────
╰────
help: for octal literals use the '0o' prefix instead
× '0'-prefixed octal literals and octal escape sequences are deprecated
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0220/input.js:1:37]
1 │ function hello() { 'use strict'; ({ 021: 42 }); }
· ───
╰────
help: for octal literals use the '0o' prefix instead
× '0'-prefixed octal literals and octal escape sequences are deprecated
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0221/input.js:1:20]
1 │ function hello() { "octal directive\1"; "use strict"; }
· ───────────────────
╰────
help: for octal literals use the '0o' prefix instead
× '0'-prefixed octal literals and octal escape sequences are deprecated
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0222/input.js:1:20]
1 │ function hello() { "octal directive\1"; "octal directive\2"; "use strict"; }
· ───────────────────
╰────
help: for octal literals use the '0o' prefix instead
× '0'-prefixed octal literals and octal escape sequences are deprecated
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0222/input.js:1:41]
1 │ function hello() { "octal directive\1"; "octal directive\2"; "use strict"; }
· ───────────────────
╰────
help: for octal literals use the '0o' prefix instead
× '0'-prefixed octal literals and octal escape sequences are deprecated
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0223/input.js:1:53]
1 │ function hello() { "use strict"; function inner() { "octal directive\1"; } }
· ───────────────────
╰────
help: for octal literals use the '0o' prefix instead
× The keyword 'implements' is reserved
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0224/input.js:1:38]
1 │ function hello() { "use strict"; var implements; }
· ──────────
╰────
note: This identifier is reserved in strict mode code
× The keyword 'interface' is reserved
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0225/input.js:1:38]
1 │ function hello() { "use strict"; var interface; }
· ─────────
╰────
note: This identifier is reserved in strict mode code
× The keyword 'package' is reserved
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0226/input.js:1:38]
1 │ function hello() { "use strict"; var package; }
· ───────
╰────
note: This identifier is reserved in strict mode code
× The keyword 'private' is reserved
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0227/input.js:1:38]
1 │ function hello() { "use strict"; var private; }
· ───────
╰────
note: This identifier is reserved in strict mode code
× The keyword 'protected' is reserved
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0228/input.js:1:38]
1 │ function hello() { "use strict"; var protected; }
· ─────────
╰────
note: This identifier is reserved in strict mode code
× The keyword 'public' is reserved
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0229/input.js:1:38]
1 │ function hello() { "use strict"; var public; }
· ──────
╰────
note: This identifier is reserved in strict mode code
× The keyword 'static' is reserved
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0230/input.js:1:38]
1 │ function hello() { "use strict"; var static; }
· ──────
╰────
note: This identifier is reserved in strict mode code
× The keyword 'yield' is reserved
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0231/input.js:1:38]
1 │ function hello() { "use strict"; var yield; }
· ─────
╰────
note: This identifier is reserved in strict mode code
× The keyword 'let' is reserved
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0232/input.js:1:38]
1 │ function hello() { "use strict"; var let; }
· ───
╰────
note: This identifier is reserved in strict mode code
× The keyword 'static' is reserved
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0233/input.js:1:16]
1 │ function hello(static) { "use strict"; }
· ──────
╰────
note: This identifier is reserved in strict mode code
× The keyword 'static' is reserved
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0234/input.js:1:10]
1 │ function static() { "use strict"; }
· ──────
╰────
note: This identifier is reserved in strict mode code
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0235/input.js:1:10]
1 │ function eval(a) { "use strict"; }
· ────
╰────
note: This is strict mode code
× Cannot assign to 'arguments' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0236/input.js:1:10]
1 │ function arguments(a) { "use strict"; }
· ─────────
╰────
note: This is strict mode code
× The keyword 'static' is reserved
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0239/input.js:1:24]
1 │ "use strict"; function static() { }
· ──────
╰────
note: This identifier is reserved in strict mode code
× Identifier `t` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0240/input.js:1:12]
1 │ function a(t, t) { "use strict"; }
· ┬ ┬
· │ ╰── It can not be redeclared here
· ╰── `t` has already been declared here
╰────
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0241/input.js:1:12]
1 │ function a(eval) { "use strict"; }
· ────
╰────
note: This is strict mode code
× The keyword 'package' is reserved
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0242/input.js:1:12]
1 │ function a(package) { "use strict"; }
· ───────
╰────
note: This identifier is reserved in strict mode code
× Identifier `t` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0243/input.js:1:41]
1 │ function a() { "use strict"; function b(t, t) { }; }
· ┬ ┬
· │ ╰── It can not be redeclared here
· ╰── `t` has already been declared here
╰────
× Identifier `t` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0244/input.js:1:13]
1 │ (function a(t, t) { "use strict"; })
· ┬ ┬
· │ ╰── It can not be redeclared here
· ╰── `t` has already been declared here
╰────
× Identifier `t` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0245/input.js:1:42]
1 │ function a() { "use strict"; (function b(t, t) { }); }
· ┬ ┬
· │ ╰── It can not be redeclared here
· ╰── `t` has already been declared here
╰────
× Cannot assign to 'eval' in strict mode
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0246/input.js:1:13]
1 │ (function a(eval) { "use strict"; })
· ────
╰────
note: This is strict mode code
× The keyword 'package' is reserved
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0247/input.js:1:13]
1 │ (function a(package) { "use strict"; })
· ───────
╰────
note: This identifier is reserved in strict mode code
× Label `__proto__` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0248/input.js:1:1]
1 │ __proto__: __proto__: 42;
· ────┬──── ────┬────
· │ ╰── It can not be redeclared here
· ╰── `__proto__` has already been declared here
╰────
× Identifier `__proto__` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0249/input.js:1:26]
1 │ "use strict"; function t(__proto__, __proto__) { }
· ────┬──── ────┬────
· │ ╰── It can not be redeclared here
· ╰── `__proto__` has already been declared here
╰────
× Identifier `__proto__` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0250/input.js:1:7]
1 │ x = { __proto__: 42, __proto__: 43 }
· ────┬──── ────┬────
· │ ╰── It can not be redeclared here
· ╰── `__proto__` has already been declared here
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0252/input.js:2:1]
1 │ var
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0254/input.js:2:1]
1 │ const
╰────
× Expected `}` but found `EOF`
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0255/input.js:2:1]
1 │ { ; ;
· ┬
· ╰── Opened here
╰────
× Expected `}` but found `EOF`
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0256/input.js:2:1]
1 │ function t() { ; ;
· ┬
· ╰── Opened here
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0257/input.js:1:16]
1 │ 'use strict'; a package
· ▲
╰────
help: Try inserting a semicolon here
× A rest parameter must be last in a parameter list
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0258/input.js:1:15]
1 │ function f(a, ...b, c){}
· ────
╰────
× A rest parameter cannot have an initializer.
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0260/input.js:1:15]
1 │ function x(...a = 1){}
· ─────
╰────
× Expected `{` but found `EOF`
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0261/input.js:2:1]
1 │ class
╰────
× Expected `{` but found `EOF`
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0262/input.js:2:1]
1 │ class
╰────
× Expected `{` but found `;`
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0263/input.js:1:6]
1 │ class;
· ┬
· ╰── `{` expected
╰────
× Expected `{` but found `+`
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0264/input.js:1:19]
1 │ class A extends a + b {}
· ┬
· ╰── `{` expected
╰────
× Expected `{` but found `EOF`
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0265/input.js:2:1]
1 │ class A
╰────
× Expected `}` but found `EOF`
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0266/input.js:2:1]
1 │ class A {
· ┬
· ╰── Opened here
╰────
× Expected `{` but found `;`
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0267/input.js:1:8]
1 │ class A;
· ┬
· ╰── `{` expected
╰────
× Expected `;` but found `:`
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0268/input.js:1:11]
1 │ class A {a:0}
· ┬
· ╰── `;` expected
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0269/input.js:1:15]
1 │ class A {a(){},b(){}}
· ─
╰────
× Classes may not have a static property named 'prototype'
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0270/input.js:1:17]
1 │ class A {static prototype(){}}
· ─────────
╰────
× Classes may not have a static property named 'prototype'
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0271/input.js:1:17]
1 │ class A {static "prototype"(){}}
· ───────────
╰────
× Constructor can't have get/set modifier
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0272/input.js:1:14]
1 │ class A {get constructor(){}}
· ───────────
╰────
× Constructor can't have get/set modifier
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0273/input.js:1:14]
1 │ class A {set constructor(m){}}
· ───────────
╰────
× Multiple constructor implementations are not allowed.
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0274/input.js:1:10]
1 │ class A {constructor(){} "constructor"(){}}
· ─────┬───── ──────┬──────
· │ ╰── it cannot be redeclared here
· ╰── constructor has already been declared here
╰────
× Expected `;` but found `static`
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0275/input.js:1:12]
1 │ class A {a static(){}}
· ───┬──
· ╰── `;` expected
╰────
× Expected `;` but found `static`
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0276/input.js:1:24]
1 │ class A {static static static(){}}
· ───┬──
· ╰── `;` expected
╰────
× Identifier expected. 'enum' is a reserved word that cannot be used here.
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0277/input.js:1:12]
1 │ class A {a(enum){}}
· ────
╰────
× The keyword 'static' is reserved
╭─[babel/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0278/input.js:1:18]
1 │ class A {static [static](){};}
· ──────
╰────
note: Classes are always strict mode code
× A 'set' accessor cannot have rest parameter.
╭─[babel/packages/babel-parser/test/fixtures/esprima/rest-parameter/invalid-setter-rest/input.js:1:13]
1 │ x = { set f(...y) {} }
· ────
╰────
× Invalid Unicode escape sequence
╭─[babel/packages/babel-parser/test/fixtures/esprima/statement-expression/migrated_0002/input.js:1:2]
1 │ \\u0061
· ─
╰────
× Invalid Unicode escape sequence
╭─[babel/packages/babel-parser/test/fixtures/esprima/statement-expression/migrated_0003/input.js:1:3]
1 │ a\\u0061
· ─
╰────
× Invalid Unicode escape sequence
╭─[babel/packages/babel-parser/test/fixtures/esprima/statement-expression/migrated_0004/input.js:1:2]
1 │ \\u0061a
· ─
╰────
× Invalid Unicode escape sequence
╭─[babel/packages/babel-parser/test/fixtures/esprima/statement-expression/migrated_0005/input.js:1:2]
1 │ \\u0061a
· ─
╰────
× Missing initializer in destructuring declaration
╭─[babel/packages/babel-parser/test/fixtures/esprima/statement-variable/complex-pattern-requires-init/input.js:1:5]
1 │ var []
· ──
╰────
help: Add an initializer (e.g. ` = undefined`) here
× TS(18019): 'abstract' modifier cannot be used with a private identifier.
╭─[babel/packages/babel-parser/test/fixtures/estree/class-private-property/typescript-invalid-abstract/input.ts:2:12]
1 │ abstract class TSAbstractClass {
2 │ abstract #foo: boolean;
· ────
3 │ }
╰────
× TS(1049): A 'set' accessor must have exactly one parameter.
╭─[babel/packages/babel-parser/test/fixtures/estree/typescript/getter-setter/input.ts:3:9]
2 │ ({ get x() { return 1 } });
3 │ ({ set x() {} });
· ──
4 │ ({ get x(x) {} });
╰────
help: Add a parameter here
× A 'get' accessor must not have any formal parameters.
╭─[babel/packages/babel-parser/test/fixtures/estree/typescript/getter-setter/input.ts:4:9]
3 │ ({ set x() {} });
4 │ ({ get x(x) {} });
· ───
╰────
help: Remove these parameters here
× TS(1031): 'declare' modifier cannot appear on class elements of this kind.
╭─[babel/packages/babel-parser/test/fixtures/estree/typescript/invalid-class-method-empty-body/input.js:4:3]
3 │ #method();
4 │ declare method();
· ───────
5 │ }
╰────
help: Allowed modifiers are: private, protected, public, static, abstract, override, async
× TS(2391): Function implementation is missing or not immediately following the declaration.
╭─[babel/packages/babel-parser/test/fixtures/estree/typescript/invalid-class-method-empty-body/input.js:2:3]
1 │ class C {
2 │ method();
· ──────
3 │ #method();
╰────
× TS(2391): Function implementation is missing or not immediately following the declaration.
╭─[babel/packages/babel-parser/test/fixtures/estree/typescript/invalid-class-method-empty-body/input.js:4:11]
3 │ #method();
4 │ declare method();
· ──────
5 │ }
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/flow/expect-plugin/export-interface/input.js:1:8]
1 │ export interface Foo {}
· ─────────
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/flow/expect-plugin/export-type/input.js:1:8]
1 │ export type Foo = number;
· ────
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/flow/expect-plugin/export-type-named/input.js:2:8]
1 │ var Foo;
2 │ export type { Foo };
· ────
╰────
× Unexpected JSX expression
╭─[babel/packages/babel-parser/test/fixtures/jsx/errors/_no-plugin-fragment/input.js:3:5]
2 │ return (
3 │ <>Hello</>
· ─
4 │ );
╰────
help: JSX syntax is disabled and should be enabled via the parser options
× Unexpected JSX expression
╭─[babel/packages/babel-parser/test/fixtures/jsx/errors/_no-plugin-jsx-expression/input.js:1:1]
1 │ <div>{name}</div>
· ─
╰────
help: JSX syntax is disabled and should be enabled via the parser options
× Unexpected JSX expression
╭─[babel/packages/babel-parser/test/fixtures/jsx/errors/_no-plugin-type-param/input.js:1:1]
1 │ <div>() => {}
· ─
╰────
help: JSX syntax is disabled and should be enabled via the parser options
× Unexpected JSX expression
╭─[babel/packages/babel-parser/test/fixtures/jsx/errors/_no_plugin/input.js:1:1]
1 │ <div></div>
· ─
╰────
help: JSX syntax is disabled and should be enabled via the parser options
× Unexpected JSX expression
╭─[babel/packages/babel-parser/test/fixtures/jsx/errors/_no_plugin-non-BMP-identifier/input.js:1:1]
1 │ <
· ─
2 │ 𠮷
╰────
help: JSX syntax is disabled and should be enabled via the parser options
× Unexpected token. Did you mean `{'>'}` or `&gt;`?
╭─[babel/packages/babel-parser/test/fixtures/jsx/errors/unclosed-jsx-element/input.js:1:10]
1 │ <div>() => {}
· ▲
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/placeholders/_errors/no-plugin/input.js:1:1]
1 │ %%FOO%%
· ─
╰────
× Bad escape sequence in untagged template literal
╭─[babel/packages/babel-parser/test/fixtures/tokens/template-string/invalid-octal/input.js:1:2]
1 │ `\1`;
· ──
2 │ `\1${x}\2${y}\3`;
╰────
× Bad escape sequence in untagged template literal
╭─[babel/packages/babel-parser/test/fixtures/tokens/template-string/invalid-octal/input.js:2:2]
1 │ `\1`;
2 │ `\1${x}\2${y}\3`;
· ──
╰────
× Bad escape sequence in untagged template literal
╭─[babel/packages/babel-parser/test/fixtures/tokens/template-string/invalid-octal/input.js:2:8]
1 │ `\1`;
2 │ `\1${x}\2${y}\3`;
· ──
╰────
× Bad escape sequence in untagged template literal
╭─[babel/packages/babel-parser/test/fixtures/tokens/template-string/invalid-octal/input.js:2:14]
1 │ `\1`;
2 │ `\1${x}\2${y}\3`;
· ──
╰────
× Bad escape sequence in untagged template literal
╭─[babel/packages/babel-parser/test/fixtures/tokens/template-string/invalid-unicode-escape-codepoint/input.js:1:2]
1 │ `\u{g}`;
· ─────
2 │ `\u{g}${x}\u{g}${y}\u{g}`;
╰────
× Bad escape sequence in untagged template literal
╭─[babel/packages/babel-parser/test/fixtures/tokens/template-string/invalid-unicode-escape-codepoint/input.js:2:2]
1 │ `\u{g}`;
2 │ `\u{g}${x}\u{g}${y}\u{g}`;
· ─────
╰────
× Bad escape sequence in untagged template literal
╭─[babel/packages/babel-parser/test/fixtures/tokens/template-string/invalid-unicode-escape-codepoint/input.js:2:11]
1 │ `\u{g}`;
2 │ `\u{g}${x}\u{g}${y}\u{g}`;
· ─────
╰────
× Bad escape sequence in untagged template literal
╭─[babel/packages/babel-parser/test/fixtures/tokens/template-string/invalid-unicode-escape-codepoint/input.js:2:20]
1 │ `\u{g}`;
2 │ `\u{g}${x}\u{g}${y}\u{g}`;
· ─────
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/typescript/arrow-function/async-arrow-function-after-binary-operator/input.ts:1:20]
1 │ 4 + async<number>() => 2
· ▲
╰────
help: Try inserting a semicolon here
× TS(1047): A rest parameter cannot be optional
╭─[babel/packages/babel-parser/test/fixtures/typescript/arrow-function/async-rest-optional-parameter/input.ts:1:14]
1 │ async(...args?: any[]) : any => {}
· ─
╰────
help: Remove this `?`. The default value is an empty array
× Unexpected token. Did you mean `{'>'}` or `&gt;`?
╭─[babel/packages/babel-parser/test/fixtures/typescript/arrow-function/generic-tsx/input.ts:2:15]
1 │ // Generics without trailing comma are disallowed in JSX
2 │ <T>(a: T): T => a;
· ▲
3 │
╰────
× Expected `{` but found `=>`
╭─[babel/packages/babel-parser/test/fixtures/typescript/arrow-function/invalid-class-implements/input.ts:1:22]
1 │ class Q implements x => void {}
· ─┬
· ╰── `{` expected
╰────
× Keywords cannot contain escape characters
╭─[babel/packages/babel-parser/test/fixtures/typescript/assert-predicate/invalid-escaped-asserts-keyword/input.ts:1:50]
1 │ declare function assertIsString(value: unknown): \u{61}sserts value;
· ────────────
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/typescript/assign/invalid/input.ts:1:2]
1 │ (a = b) += 1;
· ─────
╰────
× The left-hand side of an assignment expression must be a variable or a property access.
╭─[babel/packages/babel-parser/test/fixtures/typescript/assign/invalid-TSTypeParameterInstantiation/input.ts:15:5]
14 │
15 │ cls.myFunc<ConcreteClass> = (instance) => {
· ─────────────────────────
16 │ console.log(instance.myField);
╰────
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/typescript/assign/parenthesized-object-assign/input.ts:1:1]
1 │ ({}) = x
· ────
╰────
× Expected `=>` but found `EOF`
╭─[babel/packages/babel-parser/test/fixtures/typescript/async-call/with-optional-parameter/input.ts:1:10]
1 │ async(x?)
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/typescript/cast/arrow-async-parameter-as/input.ts:1:15]
1 │ async (a as T) => {};
· ▲
╰────
help: Try inserting a semicolon here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/typescript/cast/arrow-async-parameter-assertion/input.ts:1:14]
1 │ async (<T> a) => {};
· ▲
╰────
help: Try inserting a semicolon here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/typescript/cast/arrow-parameter-as/input.ts:1:9]
1 │ (a as T) => {};
· ▲
╰────
help: Try inserting a semicolon here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/typescript/cast/arrow-parameter-assertion/input.ts:1:8]
1 │ (<T> a) => {};
· ▲
╰────
help: Try inserting a semicolon here
× Invalid rest element target in destructuring assignment
╭─[babel/packages/babel-parser/test/fixtures/typescript/cast/destructuring-assignent-rest-invalid/input.ts:1:9]
1 │ 0, { ...{} as T} = b;
· ───────
2 │ [...[] as T] = b;
╰────
help: Expected an identifier or member expression, like `...rest` or `...obj.prop`.
× Cannot assign to this expression
╭─[babel/packages/babel-parser/test/fixtures/typescript/cast/destructuring-assignent-rest-invalid/input.ts:1:9]
1 │ 0, { ...{} as T} = b;
· ───────
2 │ [...[] as T] = b;
╰────
× Expected `=>` but found `;`
╭─[babel/packages/babel-parser/test/fixtures/typescript/cast/invalid/input.ts:1:6]
1 │ (a:b);
· ┬
· ╰── `=>` expected
2 │ (a:b,c:d);
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/typescript/cast/null-assertion-invalid-arrow-param/input.ts:1:5]
1 │ (a!) => b;
· ▲
2 │ (a! = b) => c;
╰────
help: Try inserting a semicolon here
× Expected `,` or `)` but found `:`
╭─[babel/packages/babel-parser/test/fixtures/typescript/cast/parameter-typecast/input.ts:1:7]
1 │ func(a: T);
· ┬ ┬
· │ ╰── `,` or `)` expected
· ╰── Opened here
2 │ func<T>(a: T);
╰────
× TS(1244): Abstract methods can only appear within an abstract class.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/abstract-method-in-non-abstract-class-1/input.ts:2:12]
1 │ class Foo {
2 │ abstract method();
· ──────
3 │ }
╰────
× TS(1244): Abstract methods can only appear within an abstract class.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/abstract-method-in-non-abstract-class-2/input.ts:4:16]
3 │ return class {
4 │ abstract m();
· ─
5 │ }
╰────
× TS(1244): Abstract methods can only appear within an abstract class.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/abstract-method-in-non-abstract-class-3/input.ts:1:41]
1 │ abstract class C { p = class { abstract method() } }
· ──────
╰────
× TS(1245): Method 'method' cannot have an implementation because it is marked abstract.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/abstract-method-with-body/input.ts:2:12]
1 │ abstract class Foo {
2 │ abstract method() {}
· ──────
3 │ }
╰────
× TS(1245): Method 'foo()' cannot have an implementation because it is marked abstract.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/abstract-method-with-body-computed/input.ts:2:13]
1 │ abstract class Foo {
2 │ abstract [foo()]() {}
· ─────
3 │ }
╰────
× TS(1267): Property 'prop' cannot have an initializer because it is marked abstract.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/abstract-property-initializer/input.ts:2:12]
1 │ abstract class Foo {
2 │ abstract prop = 1
· ────
3 │ abstract [Bar.foo] = 2
╰────
× TS(1267): Property 'Bar.foo' cannot have an initializer because it is marked abstract.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/abstract-property-initializer/input.ts:3:13]
2 │ abstract prop = 1
3 │ abstract [Bar.foo] = 2
· ───────
4 │ abstract [Bar] = 3
╰────
× TS(1267): Property 'Bar' cannot have an initializer because it is marked abstract.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/abstract-property-initializer/input.ts:4:13]
3 │ abstract [Bar.foo] = 2
4 │ abstract [Bar] = 3
· ───
5 │ abstract 2 = 4
╰────
× TS(1267): Property '2' cannot have an initializer because it is marked abstract.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/abstract-property-initializer/input.ts:5:12]
4 │ abstract [Bar] = 3
5 │ abstract 2 = 4
· ─
6 │ abstract "c" = 5
╰────
× TS(1267): Property 'c' cannot have an initializer because it is marked abstract.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/abstract-property-initializer/input.ts:6:12]
5 │ abstract 2 = 4
6 │ abstract "c" = 5
· ───
7 │ }
╰────
× TS(1243): 'accessor' modifier cannot be used with 'declare' modifier.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/accessor-invalid/input.ts:2:3]
1 │ abstract class Foo {
2 │ declare accessor prop7: number;
· ───────
3 │ private accessor #p: any;
╰────
help: Allowed modifiers are: private, protected, public, static, abstract, override
× TS(18010): An accessibility modifier cannot be used with a private identifier.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/accessor-invalid/input.ts:3:3]
2 │ declare accessor prop7: number;
3 │ private accessor #p: any;
· ───────
4 │
╰────
help: Private identifiers are enforced at runtime, while accessibility modifiers only affect type checking, so using both is redundant.
× TS(1264): Declarations with definite assignment assertions must also have type annotations.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/accessor-invalid/input.ts:5:13]
4 │
5 │ accessor a!;
· ─
6 │ abstract accessor #s;
╰────
× TS(1276): An 'accessor' property cannot be declared optional.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/accessor-invalid/input.ts:7:14]
6 │ abstract accessor #s;
7 │ accessor #d?;
· ─
8 │ abstract accessor f = 1;
╰────
help: Remove this `?`
× TS(1243): 'accessor' modifier cannot be used with 'readonly' modifier.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/accessor-invalid/input.ts:9:3]
8 │ abstract accessor f = 1;
9 │ readonly accessor g;
· ────────
10 │ }
╰────
help: Allowed modifiers are: private, protected, public, static, abstract, override
× TS(1039): Initializers are not allowed in ambient contexts.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/accessor-invalid/input.ts:14:8]
13 │ accessor x = 1;
14 │ #y = 1;
· ─
15 │ }
╰────
× TS(2369): A parameter property is only allowed in a constructor implementation.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/constructor-overload-modifiers-invalid/input.ts:2:17]
1 │ class C {
2 │ constructor(public x: number, private y: number);
· ────────────────
3 │ constructor(protected x: string, readonly y: string);
╰────
× TS(2369): A parameter property is only allowed in a constructor implementation.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/constructor-overload-modifiers-invalid/input.ts:2:35]
1 │ class C {
2 │ constructor(public x: number, private y: number);
· ─────────────────
3 │ constructor(protected x: string, readonly y: string);
╰────
× TS(2369): A parameter property is only allowed in a constructor implementation.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/constructor-overload-modifiers-invalid/input.ts:3:17]
2 │ constructor(public x: number, private y: number);
3 │ constructor(protected x: string, readonly y: string);
· ───────────────────
4 │ constructor(x: any, y: any) {}
╰────
× TS(2369): A parameter property is only allowed in a constructor implementation.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/constructor-overload-modifiers-invalid/input.ts:3:38]
2 │ constructor(public x: number, private y: number);
3 │ constructor(protected x: string, readonly y: string);
· ──────────────────
4 │ constructor(x: any, y: any) {}
╰────
× TS(1029): 'override' modifier must precede 'readonly' modifier.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/constructor-with-invalid-order-modifiers-1/input.ts:2:24]
1 │ class D extends B {
2 │ constructor(readonly override foo: string) {}
· ────────
3 │ }
╰────
× TS(1029): 'public' modifier must precede 'readonly' modifier.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/constructor-with-invalid-order-modifiers-2/input.ts:2:24]
1 │ class D extends B {
2 │ constructor(readonly public foo: string) {}
· ──────
3 │ }
╰────
× TS(1029): 'public' modifier must precede 'readonly' modifier.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/constructor-with-invalid-order-modifiers-3/input.ts:2:33]
1 │ class D extends B {
2 │ constructor(override readonly public foo: string) {}
· ──────
3 │ }
╰────
× TS(1092): Type parameters cannot appear on a constructor declaration
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/constructor-with-type-parameters/input.ts:2:14]
1 │ class C {
2 │ constructor<T>(foo: T) {}
· ───
3 │ }
╰────
help: Instead, add type parameters to the class itself
× 'declare' modifier cannot be used here.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/declare-accessor/input.ts:2:3]
1 │ class Foo {
2 │ declare get foo()
· ───────
3 │ declare set foo(v)
╰────
× 'declare' modifier cannot be used here.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/declare-accessor/input.ts:3:3]
2 │ declare get foo()
3 │ declare set foo(v)
· ───────
4 │ }
╰────
× Getters and setters must have an implementation.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/declare-accessor/input.ts:2:15]
1 │ class Foo {
2 │ declare get foo()
· ───
3 │ declare set foo(v)
╰────
× Getters and setters must have an implementation.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/declare-accessor/input.ts:3:15]
2 │ declare get foo()
3 │ declare set foo(v)
· ───
4 │ }
╰────
× TS(2391): Function implementation is missing or not immediately following the declaration.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/declare-accessor/input.ts:3:15]
2 │ declare get foo()
3 │ declare set foo(v)
· ───
4 │ }
╰────
× TS(1039): Initializers are not allowed in ambient contexts.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/declare-field-initializer/input.ts:2:25]
1 │ class A {
2 │ declare bar: string = "test";
· ──────
3 │ }
╰────
× TS(1039): Initializers are not allowed in ambient contexts.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/declare-initializer/input.ts:2:11]
1 │ declare class C {
2 │ field = "field";
· ───────
3 │ }
╰────
× TS(1031): 'declare' modifier cannot appear on class elements of this kind.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/declare-method/input.ts:2:3]
1 │ class A {
2 │ declare foo() {}
· ───────
3 │ }
╰────
help: Allowed modifiers are: private, protected, public, static, abstract, override, async
× TS(1183): An implementation cannot be declared in ambient contexts.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/declare-method/input.ts:2:17]
1 │ class A {
2 │ declare foo() {}
· ▲
3 │ }
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/declare-new-line-abstract/input.ts:1:8]
1 │ declare abstract
· ▲
2 │ class A {}
╰────
help: Try inserting a semicolon here
× TS(1039): Initializers are not allowed in ambient contexts.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/declare-readonly-field-initializer-w-annotation/input.ts:2:34]
1 │ class A {
2 │ declare readonly bar: string = "test";
· ──────
3 │ declare baz: string = "test";
╰────
× TS(1039): Initializers are not allowed in ambient contexts.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/declare-readonly-field-initializer-w-annotation/input.ts:3:25]
2 │ declare readonly bar: string = "test";
3 │ declare baz: string = "test";
· ──────
4 │ }
╰────
× TS(1030): 'declare' modifier already seen.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/duplicate-modifier-1/input.ts:2:18]
1 │ class A {
2 │ declare public declare foo;
· ───────
3 │ }
╰────
help: Remove the duplicate modifier.
× TS(1030): 'declare' modifier already seen.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/duplicate-modifier-2/input.ts:2:25]
1 │ class A {
2 │ declare public static declare foo;
· ───────
3 │ }
╰────
help: Remove the duplicate modifier.
× TS(1028): Accessibility modifier already seen.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/duplicates-accessibility/input.ts:2:10]
1 │ class Foo {
2 │ public public a;
· ──────
3 │ private public b;
╰────
help: Remove the duplicate modifier.
× TS(1028): Accessibility modifier already seen.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/duplicates-accessibility/input.ts:3:11]
2 │ public public a;
3 │ private public b;
· ──────
4 │ protected private c;
╰────
help: Remove the duplicate modifier.
× TS(1028): Accessibility modifier already seen.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/duplicates-accessibility/input.ts:4:13]
3 │ private public b;
4 │ protected private c;
· ───────
5 │ public protected d;
╰────
help: Remove the duplicate modifier.
× TS(1028): Accessibility modifier already seen.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/duplicates-accessibility/input.ts:5:10]
4 │ protected private c;
5 │ public protected d;
· ─────────
6 │ public protected private e;
╰────
help: Remove the duplicate modifier.
× TS(1028): Accessibility modifier already seen.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/duplicates-accessibility/input.ts:6:10]
5 │ public protected d;
6 │ public protected private e;
· ─────────
7 │ }
╰────
help: Remove the duplicate modifier.
× TS(1028): Accessibility modifier already seen.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/duplicates-accessibility/input.ts:6:20]
5 │ public protected d;
6 │ public protected private e;
· ───────
7 │ }
╰────
help: Remove the duplicate modifier.
× TS(1098): Type parameter list cannot be empty.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/empty-type-parameters/input.ts:1:8]
1 │ class C<> {}
· ──
╰────
× TS(1097): 'extends' list cannot be empty.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/extends-empty/input.ts:1:15]
1 │ interface foo extends {
· ───────
2 │ }
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/extends-implements-empty/input.ts:1:34]
1 │ class Foo extends Bar implements {
· ─
2 │ }
╰────
× TS(1245): Method 'd' cannot have an implementation because it is marked abstract.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/generator-method-with-modifiers/input.ts:5:13]
4 │ static *c() {}
5 │ abstract *d() {}
· ─
6 │ readonly *e() {}
╰────
× TS(1024): 'readonly' modifier can only appear on a property declaration or index signature.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/generator-method-with-modifiers/input.ts:6:3]
5 │ abstract *d() {}
6 │ readonly *e() {}
· ────────
7 │ declare *f() {}
╰────
help: Allowed modifiers are: private, protected, public, static, abstract, override, async
× TS(1031): 'declare' modifier cannot appear on class elements of this kind.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/generator-method-with-modifiers/input.ts:7:3]
6 │ readonly *e() {}
7 │ declare *f() {}
· ───────
8 │ protected *g() {}
╰────
help: Allowed modifiers are: private, protected, public, static, abstract, override, async
× TS(1221): Generators are not allowed in an ambient context.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/generator-method-with-modifiers/input.ts:7:11]
6 │ readonly *e() {}
7 │ declare *f() {}
· ───────
8 │ protected *g() {}
╰────
× TS(1183): An implementation cannot be declared in ambient contexts.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/generator-method-with-modifiers/input.ts:7:16]
6 │ readonly *e() {}
7 │ declare *f() {}
· ▲
8 │ protected *g() {}
╰────
× TS(1244): Abstract methods can only appear within an abstract class.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/generator-method-with-modifiers/input.ts:5:13]
4 │ static *c() {}
5 │ abstract *d() {}
· ─
6 │ readonly *e() {}
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/implements-empty/input.ts:1:22]
1 │ class Foo implements {
· ─
2 │ }
╰────
× TS(1029): 'static' modifier must precede 'readonly' modifier.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/index-signature-errors/input.ts:2:14]
1 │ class C {
2 │ readonly static [x: string]: any;
· ──────
3 │ }
╰────
× TS(1263): Declarations with initializers cannot also have definite assignment assertions.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/invalid-definite-initializer/input.ts:2:4]
1 │ class C {
2 │ x!: number = 1;
· ─
3 │ #x!: number = 1;
╰────
× TS(1263): Declarations with initializers cannot also have definite assignment assertions.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/invalid-definite-initializer/input.ts:3:5]
2 │ x!: number = 1;
3 │ #x!: number = 1;
· ─
4 │ accessor a!: number = 1;
╰────
× TS(1263): Declarations with initializers cannot also have definite assignment assertions.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/invalid-definite-initializer/input.ts:4:13]
3 │ #x!: number = 1;
4 │ accessor a!: number = 1;
· ─
5 │ accessor #a!: number = 1;
╰────
× TS(1263): Declarations with initializers cannot also have definite assignment assertions.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/invalid-definite-initializer/input.ts:5:14]
4 │ accessor a!: number = 1;
5 │ accessor #a!: number = 1;
· ─
6 │ }
╰────
× TS(1264): Declarations with definite assignment assertions must also have type annotations.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/invalid-definite-without-type/input.ts:2:4]
1 │ class C {
2 │ x!;
· ─
3 │ #x!;
╰────
× TS(1264): Declarations with definite assignment assertions must also have type annotations.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/invalid-definite-without-type/input.ts:3:5]
2 │ x!;
3 │ #x!;
· ─
4 │ accessor a!;
╰────
× TS(1264): Declarations with definite assignment assertions must also have type annotations.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/invalid-definite-without-type/input.ts:4:13]
3 │ #x!;
4 │ accessor a!;
· ─
5 │ accessor #a!;
╰────
× TS(1264): Declarations with definite assignment assertions must also have type annotations.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/invalid-definite-without-type/input.ts:5:14]
4 │ accessor a!;
5 │ accessor #a!;
· ─
6 │ }
╰────
× TS(1029): 'private' modifier must precede 'override' modifier.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/invalid-modifiers-order/input.ts:2:12]
1 │ class Foo extends Bar {
2 │ override private foo1: string
· ───────
3 │ readonly private foo2: string;
╰────
× TS(1029): 'private' modifier must precede 'readonly' modifier.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/invalid-modifiers-order/input.ts:3:12]
2 │ override private foo1: string
3 │ readonly private foo2: string;
· ───────
4 │ readonly private override foo3: string;
╰────
× TS(1029): 'private' modifier must precede 'readonly' modifier.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/invalid-modifiers-order/input.ts:4:12]
3 │ readonly private foo2: string;
4 │ readonly private override foo3: string;
· ───────
5 │ private readonly override foo4: string;
╰────
× TS(1029): 'override' modifier must precede 'readonly' modifier.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/invalid-modifiers-order/input.ts:4:20]
3 │ readonly private foo2: string;
4 │ readonly private override foo3: string;
· ────────
5 │ private readonly override foo4: string;
╰────
× TS(1029): 'override' modifier must precede 'readonly' modifier.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/invalid-modifiers-order/input.ts:5:20]
4 │ readonly private override foo3: string;
5 │ private readonly override foo4: string;
· ────────
6 │ }
╰────
× TS(1024): 'readonly' modifier can only appear on a property declaration or index signature.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/method-readonly/input.ts:2:5]
1 │ class C {
2 │ readonly m() {}
· ────────
3 │ }
╰────
help: Allowed modifiers are: private, protected, public, static, abstract, override, async
× The keyword 'private' is reserved
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/modifier-name-parameters/input.ts:2:15]
1 │ class Foo {
2 │ constructor(private, public, static) {
· ───────
3 │ }
╰────
note: Classes are always strict mode code
× The keyword 'public' is reserved
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/modifier-name-parameters/input.ts:2:24]
1 │ class Foo {
2 │ constructor(private, public, static) {
· ──────
3 │ }
╰────
note: Classes are always strict mode code
× The keyword 'static' is reserved
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/modifier-name-parameters/input.ts:2:32]
1 │ class Foo {
2 │ constructor(private, public, static) {
· ──────
3 │ }
╰────
note: Classes are always strict mode code
× TS(1243): 'static' modifier cannot be used with 'abstract' modifier.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/modifiers-incompatible/input.ts:2:10]
1 │ abstract class A extends Base {
2 │ static abstract m1();
· ────────
3 │ abstract static m1();
╰────
× TS(1243): 'static' modifier cannot be used with 'abstract' modifier.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/modifiers-incompatible/input.ts:3:12]
2 │ static abstract m1();
3 │ abstract static m1();
· ──────
4 │
╰────
× TS(1243): 'override' modifier cannot be used with 'declare' modifier.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/modifiers-incompatible/input.ts:5:11]
4 │
5 │ declare override prop1: any;
· ────────
6 │ override declare prop2: any;
╰────
× TS(1040): 'override' modifier cannot be used in an ambient context.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/modifiers-incompatible/input.ts:6:12]
5 │ declare override prop1: any;
6 │ override declare prop2: any;
· ───────
7 │ }
╰────
× TS(1071): 'abstract' modifier cannot appear on an index signature.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/modifiers-index-signatures/input.ts:2:3]
1 │ class C {
2 │ abstract [key: string]: string;
· ────────
3 │ declare [key: string]: string;
╰────
help: Allowed modifiers are: static, readonly
× TS(1071): 'declare' modifier cannot appear on an index signature.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/modifiers-index-signatures/input.ts:3:3]
2 │ abstract [key: string]: string;
3 │ declare [key: string]: string;
· ───────
4 │ private [key: string]: string;
╰────
help: Allowed modifiers are: static, readonly
× TS(1071): 'private' modifier cannot appear on an index signature.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/modifiers-index-signatures/input.ts:4:3]
3 │ declare [key: string]: string;
4 │ private [key: string]: string;
· ───────
5 │ public [key: string]: string;
╰────
help: Allowed modifiers are: static, readonly
× TS(1071): 'public' modifier cannot appear on an index signature.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/modifiers-index-signatures/input.ts:5:3]
4 │ private [key: string]: string;
5 │ public [key: string]: string;
· ──────
6 │ protected [key: string]: string;
╰────
help: Allowed modifiers are: static, readonly
× TS(1071): 'protected' modifier cannot appear on an index signature.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/modifiers-index-signatures/input.ts:6:3]
5 │ public [key: string]: string;
6 │ protected [key: string]: string;
· ─────────
7 │ }
╰────
help: Allowed modifiers are: static, readonly
× TS(1029): 'static' modifier must precede 'override' modifier.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/modifiers-invalid-order/input.ts:3:12]
2 │ static override m1() {}
3 │ override static m2() {}
· ──────
4 │
╰────
× TS(1029): 'override' modifier must precede 'readonly' modifier.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/modifiers-invalid-order/input.ts:6:12]
5 │ override readonly p4;
6 │ readonly override p3;
· ────────
7 │
╰────
× TS(1029): 'public' modifier must precede 'override' modifier.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/modifiers-invalid-order/input.ts:9:12]
8 │ public override m5() {}
9 │ override public m6() {}
· ──────
10 │
╰────
× TS(1029): 'protected' modifier must precede 'override' modifier.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/modifiers-invalid-order/input.ts:12:12]
11 │ protected override m7() {}
12 │ override protected m8() {}
· ─────────
13 │
╰────
× TS(1029): 'private' modifier must precede 'override' modifier.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/modifiers-invalid-order/input.ts:15:12]
14 │ private override m9() {}
15 │ override private m10() {}
· ───────
16 │
╰────
× TS(1029): 'abstract' modifier must precede 'override' modifier.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/modifiers-invalid-order/input.ts:18:12]
17 │ abstract override m12();
18 │ override abstract m11();
· ────────
19 │
╰────
× TS(1029): 'public' modifier must precede 'static' modifier.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/modifiers-invalid-order/input.ts:21:10]
20 │ public static m14() {}
21 │ static public m13() {}
· ──────
22 │
╰────
× TS(1029): 'protected' modifier must precede 'static' modifier.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/modifiers-invalid-order/input.ts:24:10]
23 │ protected static m16() {}
24 │ static protected m15() {}
· ─────────
25 │
╰────
× TS(1029): 'private' modifier must precede 'static' modifier.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/modifiers-invalid-order/input.ts:27:10]
26 │ private static m18() {}
27 │ static private m17() {}
· ───────
28 │ }
╰────
× TS(1071): 'override' modifier cannot appear on an index signature.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/modifiers-override-errors/input.ts:3:3]
2 │ override constructor() {}
3 │ override [x: string]: any;
· ────────
4 │ }
╰────
help: Allowed modifiers are: static, readonly
× Expected `;` but found `Identifier`
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/optional-async-error/input.js:3:12]
2 │ class A extends B {
3 │ async? method(val: string): Promise<void>;
· ───┬──
· ╰── `;` expected
4 │ }
╰────
× TS(1245): Method 'd' cannot have an implementation because it is marked abstract.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/optional-generator-method-with-invalid-modifiers/input.ts:2:13]
1 │ class C {
2 │ abstract *d?() { }
· ─
3 │ readonly *e?() { }
╰────
× TS(1024): 'readonly' modifier can only appear on a property declaration or index signature.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/optional-generator-method-with-invalid-modifiers/input.ts:3:3]
2 │ abstract *d?() { }
3 │ readonly *e?() { }
· ────────
4 │ declare *f?() { }
╰────
help: Allowed modifiers are: private, protected, public, static, abstract, override, async
× TS(1031): 'declare' modifier cannot appear on class elements of this kind.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/optional-generator-method-with-invalid-modifiers/input.ts:4:3]
3 │ readonly *e?() { }
4 │ declare *f?() { }
· ───────
5 │ }
╰────
help: Allowed modifiers are: private, protected, public, static, abstract, override, async
× TS(1221): Generators are not allowed in an ambient context.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/optional-generator-method-with-invalid-modifiers/input.ts:4:11]
3 │ readonly *e?() { }
4 │ declare *f?() { }
· ─────────
5 │ }
╰────
× TS(1183): An implementation cannot be declared in ambient contexts.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/optional-generator-method-with-invalid-modifiers/input.ts:4:17]
3 │ readonly *e?() { }
4 │ declare *f?() { }
· ▲
5 │ }
╰────
× TS(1245): Method 'd?.d' cannot have an implementation because it is marked abstract.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/optional-generator-method-with-invalid-modifiers/input.ts:8:14]
7 │ class A {
8 │ abstract *[d?.d]?() { }
· ────
9 │ readonly *[e?.e]?() { }
╰────
× TS(1024): 'readonly' modifier can only appear on a property declaration or index signature.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/optional-generator-method-with-invalid-modifiers/input.ts:9:3]
8 │ abstract *[d?.d]?() { }
9 │ readonly *[e?.e]?() { }
· ────────
10 │ declare *[f?.f]?() { }
╰────
help: Allowed modifiers are: private, protected, public, static, abstract, override, async
× TS(1031): 'declare' modifier cannot appear on class elements of this kind.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/optional-generator-method-with-invalid-modifiers/input.ts:10:3]
9 │ readonly *[e?.e]?() { }
10 │ declare *[f?.f]?() { }
· ───────
11 │ }
╰────
help: Allowed modifiers are: private, protected, public, static, abstract, override, async
× TS(1221): Generators are not allowed in an ambient context.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/optional-generator-method-with-invalid-modifiers/input.ts:10:11]
9 │ readonly *[e?.e]?() { }
10 │ declare *[f?.f]?() { }
· ──────────────
11 │ }
╰────
× TS(1183): An implementation cannot be declared in ambient contexts.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/optional-generator-method-with-invalid-modifiers/input.ts:10:22]
9 │ readonly *[e?.e]?() { }
10 │ declare *[f?.f]?() { }
· ▲
11 │ }
╰────
× TS(1244): Abstract methods can only appear within an abstract class.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/optional-generator-method-with-invalid-modifiers/input.ts:2:13]
1 │ class C {
2 │ abstract *d?() { }
· ─
3 │ readonly *e?() { }
╰────
× TS(1244): Abstract methods can only appear within an abstract class.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/optional-generator-method-with-invalid-modifiers/input.ts:8:14]
7 │ class A {
8 │ abstract *[d?.d]?() { }
· ────
9 │ readonly *[e?.e]?() { }
╰────
× TS(1187): A parameter property may not be declared using a binding pattern.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/parameter-properties-binding-patterns/input.ts:2:17]
1 │ class C {
2 │ constructor(public []) {}
· ─────────
3 │ }
╰────
× TS(1187): A parameter property may not be declared using a binding pattern.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/parameter-properties-binding-patterns/input.ts:5:17]
4 │ class D {
5 │ constructor(public {}) {}
· ─────────
6 │ }
╰────
× TS(1090): 'readonly' modifier cannot appear on a parameter.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/parameter-properties-not-constructor/input.ts:3:9]
2 │ not_constructor(
3 │ readonly r,
· ────────
4 │ public pu: number,
╰────
help: No modifiers are allowed here.
× TS(1090): 'public' modifier cannot appear on a parameter.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/parameter-properties-not-constructor/input.ts:4:9]
3 │ readonly r,
4 │ public pu: number,
· ──────
5 │ protected po?,
╰────
help: No modifiers are allowed here.
× TS(1090): 'protected' modifier cannot appear on a parameter.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/parameter-properties-not-constructor/input.ts:5:9]
4 │ public pu: number,
5 │ protected po?,
· ─────────
6 │ private pi?: number,
╰────
help: No modifiers are allowed here.
× TS(1090): 'private' modifier cannot appear on a parameter.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/parameter-properties-not-constructor/input.ts:6:9]
5 │ protected po?,
6 │ private pi?: number,
· ───────
7 │ public readonly pur,
╰────
help: No modifiers are allowed here.
× TS(1090): 'public' modifier cannot appear on a parameter.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/parameter-properties-not-constructor/input.ts:7:9]
6 │ private pi?: number,
7 │ public readonly pur,
· ──────
8 │ // Also works on AssignmentPattern
╰────
help: No modifiers are allowed here.
× TS(1090): 'readonly' modifier cannot appear on a parameter.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/parameter-properties-not-constructor/input.ts:7:16]
6 │ private pi?: number,
7 │ public readonly pur,
· ────────
8 │ // Also works on AssignmentPattern
╰────
help: No modifiers are allowed here.
× TS(1016): A required parameter cannot follow an optional parameter.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/parameter-properties-not-constructor/input.ts:7:9]
6 │ private pi?: number,
7 │ public readonly pur,
· ───────────────────
8 │ // Also works on AssignmentPattern
╰────
× TS(1090): 'readonly' modifier cannot appear on a parameter.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/parameter-properties-not-constructor/input.ts:9:9]
8 │ // Also works on AssignmentPattern
9 │ readonly x = 0,
· ────────
10 │ public y?: number = 0) {}
╰────
help: No modifiers are allowed here.
× TS(1090): 'public' modifier cannot appear on a parameter.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/parameter-properties-not-constructor/input.ts:10:9]
9 │ readonly x = 0,
10 │ public y?: number = 0) {}
· ──────
11 │ }
╰────
help: No modifiers are allowed here.
× TS(1015): A parameter cannot have a question mark and an initializer.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/parameter-properties-not-constructor/input.ts:10:16]
9 │ readonly x = 0,
10 │ public y?: number = 0) {}
· ─
11 │ }
╰────
× TS(18019): 'abstract' modifier cannot be used with a private identifier.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/private-fields-modifier-abstract/input.ts:2:12]
1 │ abstract class A {
2 │ abstract #a;
· ──
3 │ }
╰────
× TS(18010): An accessibility modifier cannot be used with a private identifier.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/private-fields-modifier-private/input.ts:2:3]
1 │ class A {
2 │ private #a;
· ───────
3 │ }
╰────
help: Private identifiers are enforced at runtime, while accessibility modifiers only affect type checking, so using both is redundant.
× TS(18010): An accessibility modifier cannot be used with a private identifier.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/private-fields-modifier-protected/input.ts:2:3]
1 │ class A {
2 │ protected #a;
· ─────────
3 │ }
╰────
help: Private identifiers are enforced at runtime, while accessibility modifiers only affect type checking, so using both is redundant.
× TS(18010): An accessibility modifier cannot be used with a private identifier.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/private-fields-modifier-public/input.ts:2:3]
1 │ class A {
2 │ public #a;
· ──────
3 │ }
╰────
help: Private identifiers are enforced at runtime, while accessibility modifiers only affect type checking, so using both is redundant.
× A property cannot be both optional and definite.
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/property-optional-definite-assignment-not-allowed/input.ts:2:4]
1 │ class C {
2 │ x?!: number;
· ──
3 │ }
╰────
help: Remove either the `?` or the `!`
× Expected `;` but found `Identifier`
╭─[babel/packages/babel-parser/test/fixtures/typescript/class/protected-static/input.ts:3:10]
2 │ protected static
3 │ static a() {}
· ┬
· ╰── `;` expected
4 │ }
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/typescript/const/invalid-initializer-ambient-context/input.ts:2:35]
1 │ declare namespace N {
2 │ export const not_enum = N[not + enum];
· ────
3 │ export const binary_expression = 1 + 2;
╰────
× Missing initializer in const declaration
╭─[babel/packages/babel-parser/test/fixtures/typescript/const/no-initializer/input.ts:1:7]
1 │ const x: number;
· ─
╰────
help: Add an initializer (e.g. ` = undefined`) here
× Missing initializer in const declaration
╭─[babel/packages/babel-parser/test/fixtures/typescript/const/reserved-word/input.ts:1:7]
1 │ const b: const;
· ─
╰────
help: Add an initializer (e.g. ` = undefined`) here
× Missing initializer in destructuring declaration
╭─[babel/packages/babel-parser/test/fixtures/typescript/declare/destructure-new-line/input.ts:2:7]
1 │ declare
2 │ const { x, y }: { x: number, y: number };
· ────────
╰────
help: Add an initializer (e.g. ` = undefined`) here
× TS(1183): An implementation cannot be declared in ambient contexts.
╭─[babel/packages/babel-parser/test/fixtures/typescript/declare/function/input.ts:1:24]
1 │ declare function foo() {}
· ▲
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/typescript/declare/invalid-await-using-declaration/input.ts:1:8]
1 │ declare await using basic;
· ▲
╰────
help: Try inserting a semicolon here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/typescript/declare/invalid-await-using-declaration-with-initializer/input.ts:1:8]
1 │ declare await using basic = null;
· ▲
╰────
help: Try inserting a semicolon here
× TS(1039): Initializers are not allowed in ambient contexts.
╭─[babel/packages/babel-parser/test/fixtures/typescript/declare/invalid-definite-assignment/input.ts:1:26]
1 │ declare var w!: number = 1;
· ─
2 │ declare let x!: number = 1;
╰────
× TS(1263): Declarations with initializers cannot also have definite assignment assertions.
╭─[babel/packages/babel-parser/test/fixtures/typescript/declare/invalid-definite-assignment/input.ts:1:14]
1 │ declare var w!: number = 1;
· ─
2 │ declare let x!: number = 1;
╰────
× TS(1039): Initializers are not allowed in ambient contexts.
╭─[babel/packages/babel-parser/test/fixtures/typescript/declare/invalid-definite-assignment/input.ts:2:26]
1 │ declare var w!: number = 1;
2 │ declare let x!: number = 1;
· ─
3 │ declare const y!: number = 1;
╰────
× TS(1263): Declarations with initializers cannot also have definite assignment assertions.
╭─[babel/packages/babel-parser/test/fixtures/typescript/declare/invalid-definite-assignment/input.ts:2:14]
1 │ declare var w!: number = 1;
2 │ declare let x!: number = 1;
· ─
3 │ declare const y!: number = 1;
╰────
× TS(1039): Initializers are not allowed in ambient contexts.
╭─[babel/packages/babel-parser/test/fixtures/typescript/declare/invalid-definite-assignment/input.ts:3:28]
2 │ declare let x!: number = 1;
3 │ declare const y!: number = 1;
· ─
4 │ {
╰────
× TS(1263): Declarations with initializers cannot also have definite assignment assertions.
╭─[babel/packages/babel-parser/test/fixtures/typescript/declare/invalid-definite-assignment/input.ts:3:16]
2 │ declare let x!: number = 1;
3 │ declare const y!: number = 1;
· ─
4 │ {
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/typescript/declare/invalid-definite-assignment/input.ts:5:10]
4 │ {
5 │ declare using z!: number = 1;
· ▲
6 │ declare await using za!: number = 1;
╰────
help: Try inserting a semicolon here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/typescript/declare/invalid-definite-pattern-assignment-await-using/input.ts:2:10]
1 │ {
2 │ declare await using {}! = {};
· ▲
3 │ }
╰────
help: Try inserting a semicolon here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/typescript/declare/invalid-definite-pattern-assignment-const/input.ts:1:17]
1 │ declare const {}! = {};
· ▲
╰────
help: Try inserting a semicolon here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/typescript/declare/invalid-definite-pattern-assignment-let/input.ts:1:15]
1 │ declare let {}! = {};
· ▲
╰────
help: Try inserting a semicolon here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/typescript/declare/invalid-definite-pattern-assignment-using/input.ts:2:10]
1 │ {
2 │ declare using {}! = {};
· ▲
3 │ }
╰────
help: Try inserting a semicolon here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/typescript/declare/invalid-definite-pattern-assignment-var/input.ts:1:15]
1 │ declare var {}! = {};
· ▲
╰────
help: Try inserting a semicolon here
× TS(1264): Declarations with definite assignment assertions must also have type annotations.
╭─[babel/packages/babel-parser/test/fixtures/typescript/declare/invalid-definite-without-type/input.ts:1:14]
1 │ declare var w!;
· ─
2 │ declare let x!;
╰────
× TS(1264): Declarations with definite assignment assertions must also have type annotations.
╭─[babel/packages/babel-parser/test/fixtures/typescript/declare/invalid-definite-without-type/input.ts:2:14]
1 │ declare var w!;
2 │ declare let x!;
· ─
3 │ declare const y!;
╰────
× TS(1264): Declarations with definite assignment assertions must also have type annotations.
╭─[babel/packages/babel-parser/test/fixtures/typescript/declare/invalid-definite-without-type/input.ts:3:16]
2 │ declare let x!;
3 │ declare const y!;
· ─
4 │ {
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/typescript/declare/invalid-definite-without-type/input.ts:5:10]
4 │ {
5 │ declare using z!;
· ▲
6 │ declare await using za!;
╰────
help: Try inserting a semicolon here
× TS(1546): 'await using' declarations are not allowed in ambient contexts.
╭─[babel/packages/babel-parser/test/fixtures/typescript/declare/invalid-namespace-await-using/input.ts:2:15]
1 │ declare namespace invalid_namespace_var {
2 │ await using A;
· ─
3 │ await using A1 = 0;
╰────
× TS(1546): 'await using' declarations are not allowed in ambient contexts.
╭─[babel/packages/babel-parser/test/fixtures/typescript/declare/invalid-namespace-await-using/input.ts:3:15]
2 │ await using A;
3 │ await using A1 = 0;
· ──
4 │ await using A2: number = 0;
╰────
× TS(1546): 'await using' declarations are not allowed in ambient contexts.
╭─[babel/packages/babel-parser/test/fixtures/typescript/declare/invalid-namespace-await-using/input.ts:4:15]
3 │ await using A1 = 0;
4 │ await using A2: number = 0;
· ──
5 │ await using B, C;
╰────
× TS(1546): 'await using' declarations are not allowed in ambient contexts.
╭─[babel/packages/babel-parser/test/fixtures/typescript/declare/invalid-namespace-await-using/input.ts:5:15]
4 │ await using A2: number = 0;
5 │ await using B, C;
· ─
6 │ }
╰────
× TS(1183): An implementation cannot be declared in ambient contexts.
╭─[babel/packages/babel-parser/test/fixtures/typescript/declare/invalid-namespace-class-method-implementation/input.ts:3:14]
2 │ class C {
3 │ method() {}
· ▲
4 │ }
╰────
× TS(1545): 'using' declarations are not allowed in ambient contexts.
╭─[babel/packages/babel-parser/test/fixtures/typescript/declare/invalid-namespace-using/input.ts:2:9]
1 │ declare namespace invalid_namespace_var {
2 │ using A;
· ─
3 │ using A1 = 0;
╰────
× TS(1545): 'using' declarations are not allowed in ambient contexts.
╭─[babel/packages/babel-parser/test/fixtures/typescript/declare/invalid-namespace-using/input.ts:3:9]
2 │ using A;
3 │ using A1 = 0;
· ──
4 │ using A2: number = 0;
╰────
× TS(1545): 'using' declarations are not allowed in ambient contexts.
╭─[babel/packages/babel-parser/test/fixtures/typescript/declare/invalid-namespace-using/input.ts:4:9]
3 │ using A1 = 0;
4 │ using A2: number = 0;
· ──
5 │ using B, C;
╰────
× TS(1545): 'using' declarations are not allowed in ambient contexts.
╭─[babel/packages/babel-parser/test/fixtures/typescript/declare/invalid-namespace-using/input.ts:5:9]
4 │ using A2: number = 0;
5 │ using B, C;
· ─
6 │ }
╰────
× TS(1039): Initializers are not allowed in ambient contexts.
╭─[babel/packages/babel-parser/test/fixtures/typescript/declare/invalid-namespace-var/input.ts:2:11]
1 │ declare namespace invalid_namespace_var {
2 │ var A = 0;
· ─
3 │ var A1: number = 0;
╰────
× TS(1039): Initializers are not allowed in ambient contexts.
╭─[babel/packages/babel-parser/test/fixtures/typescript/declare/invalid-namespace-var/input.ts:3:20]
2 │ var A = 0;
3 │ var A1: number = 0;
· ─
4 │ let B = 0;
╰────
× TS(1039): Initializers are not allowed in ambient contexts.
╭─[babel/packages/babel-parser/test/fixtures/typescript/declare/invalid-namespace-var/input.ts:4:11]
3 │ var A1: number = 0;
4 │ let B = 0;
· ─
5 │ let B1: number = 0;
╰────
× TS(1039): Initializers are not allowed in ambient contexts.
╭─[babel/packages/babel-parser/test/fixtures/typescript/declare/invalid-namespace-var/input.ts:5:20]
4 │ let B = 0;
5 │ let B1: number = 0;
· ─
6 │ const C: number = 0;
╰────
× TS(1039): Initializers are not allowed in ambient contexts.
╭─[babel/packages/babel-parser/test/fixtures/typescript/declare/invalid-namespace-var/input.ts:6:21]
5 │ let B1: number = 0;
6 │ const C: number = 0;
· ─
7 │ }
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/typescript/declare/invalid-using-declaration/input.ts:1:8]
1 │ declare using basic;
· ▲
╰────
help: Try inserting a semicolon here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/typescript/declare/invalid-using-declaration-with-initializer/input.ts:1:8]
1 │ declare using basic = null;
· ▲
╰────
help: Try inserting a semicolon here
× TS(1039): Initializers are not allowed in ambient contexts.
╭─[babel/packages/babel-parser/test/fixtures/typescript/declare/module-class/input.ts:3:13]
2 │ class C {
3 │ field = "field";
· ───────
4 │ }
╰────
× TS(1183): An implementation cannot be declared in ambient contexts.
╭─[babel/packages/babel-parser/test/fixtures/typescript/declare/module-function/input.ts:2:18]
1 │ declare module "m" {
2 │ function foo() {}
· ▲
3 │ }
╰────
× TS(1039): Initializers are not allowed in ambient contexts.
╭─[babel/packages/babel-parser/test/fixtures/typescript/declare/namespace-class/input.ts:3:13]
2 │ class C {
3 │ field = "field";
· ───────
4 │ }
╰────
× TS(1183): An implementation cannot be declared in ambient contexts.
╭─[babel/packages/babel-parser/test/fixtures/typescript/declare/namespace-function/input.ts:2:18]
1 │ declare namespace n {
2 │ function foo() {}
· ▲
3 │ }
╰────
× TS(1183): An implementation cannot be declared in ambient contexts.
╭─[babel/packages/babel-parser/test/fixtures/typescript/dts/invalid-class-implementation/input.ts:1:21]
1 │ function foo(): any {}
· ▲
╰────
× TS(1039): Initializers are not allowed in ambient contexts.
╭─[babel/packages/babel-parser/test/fixtures/typescript/dts/invalid-class-initializer/input.ts:2:9]
1 │ class Foo {
2 │ foo = 3;
· ─
3 │ }
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/typescript/expect-plugin/export-interface/input.js:1:8]
1 │ export interface Foo {}
· ─────────
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/typescript/expect-plugin/export-type/input.js:1:8]
1 │ export type Foo = number;
· ────
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/typescript/expect-plugin/export-type-named/input.js:2:8]
1 │ var Foo;
2 │ export type { Foo };
· ────
╰────
× A unary expression with the 'await' operator cannot be used as the left operand of an exponentiation expression
╭─[babel/packages/babel-parser/test/fixtures/typescript/exponentiation/await-non-null-before-exponential/input.ts:1:14]
1 │ async (a) => await a! ** 6;
· ────────
╰────
help: Wrap the unary expression in parentheses to make the precedence explicit
× A unary expression with the '+' operator cannot be used as the left operand of an exponentiation expression
╭─[babel/packages/babel-parser/test/fixtures/typescript/exponentiation/unary-non-null-before-exponential/input.ts:1:8]
1 │ (a) => +a! ** 6;
· ───
╰────
help: Wrap the unary expression in parentheses to make the precedence explicit
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/typescript/export/declare-invalid/input.ts:1:16]
1 │ export declare foo;
· ───
╰────
× TS(1030): 'declare' modifier already seen.
╭─[babel/packages/babel-parser/test/fixtures/typescript/export/double-declare/input.ts:1:16]
1 │ export declare declare var name;
· ───────
╰────
help: Remove the duplicate modifier.
× TS(1098): Type parameter list cannot be empty.
╭─[babel/packages/babel-parser/test/fixtures/typescript/function/empty-type-parameters/input.ts:1:13]
1 │ function foo<>() {}
· ──
╰────
× TS(1090): 'readonly' modifier cannot appear on a parameter.
╭─[babel/packages/babel-parser/test/fixtures/typescript/function/parameter-properties/input.ts:2:3]
1 │ function foo(
2 │ readonly r,
· ────────
3 │ public pu: number,
╰────
help: No modifiers are allowed here.
× TS(1090): 'public' modifier cannot appear on a parameter.
╭─[babel/packages/babel-parser/test/fixtures/typescript/function/parameter-properties/input.ts:3:3]
2 │ readonly r,
3 │ public pu: number,
· ──────
4 │ protected po?,
╰────
help: No modifiers are allowed here.
× TS(1090): 'protected' modifier cannot appear on a parameter.
╭─[babel/packages/babel-parser/test/fixtures/typescript/function/parameter-properties/input.ts:4:3]
3 │ public pu: number,
4 │ protected po?,
· ─────────
5 │ private pi?: number,
╰────
help: No modifiers are allowed here.
× TS(1090): 'private' modifier cannot appear on a parameter.
╭─[babel/packages/babel-parser/test/fixtures/typescript/function/parameter-properties/input.ts:5:3]
4 │ protected po?,
5 │ private pi?: number,
· ───────
6 │ public readonly pur,
╰────
help: No modifiers are allowed here.
× TS(1090): 'public' modifier cannot appear on a parameter.
╭─[babel/packages/babel-parser/test/fixtures/typescript/function/parameter-properties/input.ts:6:3]
5 │ private pi?: number,
6 │ public readonly pur,
· ──────
7 │ readonly x = 0,
╰────
help: No modifiers are allowed here.
× TS(1090): 'readonly' modifier cannot appear on a parameter.
╭─[babel/packages/babel-parser/test/fixtures/typescript/function/parameter-properties/input.ts:6:10]
5 │ private pi?: number,
6 │ public readonly pur,
· ────────
7 │ readonly x = 0,
╰────
help: No modifiers are allowed here.
× TS(1016): A required parameter cannot follow an optional parameter.
╭─[babel/packages/babel-parser/test/fixtures/typescript/function/parameter-properties/input.ts:6:3]
5 │ private pi?: number,
6 │ public readonly pur,
· ───────────────────
7 │ readonly x = 0,
╰────
× TS(1090): 'readonly' modifier cannot appear on a parameter.
╭─[babel/packages/babel-parser/test/fixtures/typescript/function/parameter-properties/input.ts:7:3]
6 │ public readonly pur,
7 │ readonly x = 0,
· ────────
8 │ public y?: number = 0
╰────
help: No modifiers are allowed here.
× TS(1090): 'public' modifier cannot appear on a parameter.
╭─[babel/packages/babel-parser/test/fixtures/typescript/function/parameter-properties/input.ts:8:3]
7 │ readonly x = 0,
8 │ public y?: number = 0
· ──────
9 │ ) {}
╰────
help: No modifiers are allowed here.
× TS(1015): A parameter cannot have a question mark and an initializer.
╭─[babel/packages/babel-parser/test/fixtures/typescript/function/parameter-properties/input.ts:8:10]
7 │ readonly x = 0,
8 │ public y?: number = 0
· ─
9 │ ) {}
╰────
× TS(1016): A required parameter cannot follow an optional parameter.
╭─[babel/packages/babel-parser/test/fixtures/typescript/function/pattern-optional-parameters/input.ts:1:17]
1 │ function f([]?, {}) {}
· ──
╰────
× TS(1016): A required parameter cannot follow an optional parameter.
╭─[babel/packages/babel-parser/test/fixtures/typescript/function/pattern-optional-parameters-arrow/input.ts:1:7]
1 │ ([]?, {}) => {}
· ──
╰────
× TS(1392): An import alias cannot use 'import type'
╭─[babel/packages/babel-parser/test/fixtures/typescript/import/export-import-type/input.ts:1:8]
1 │ export import type A = B.C;
· ────────────────────
╰────
× TS(1392): An import alias cannot use 'import type'
╭─[babel/packages/babel-parser/test/fixtures/typescript/import/type-equals/input.ts:1:1]
1 │ import type A = B.C;
· ────────────────────
2 │ import type B = C;
╰────
× TS(1392): An import alias cannot use 'import type'
╭─[babel/packages/babel-parser/test/fixtures/typescript/import/type-equals/input.ts:2:1]
1 │ import type A = B.C;
2 │ import type B = C;
· ──────────────────
╰────
× 'abstract' modifier cannot be used here.
╭─[babel/packages/babel-parser/test/fixtures/typescript/interface/abstract/input.ts:1:1]
1 │ abstract interface Foo {
· ────────
2 │ foo: string;
╰────
help: Only 'declare' modifier is allowed here.
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/typescript/interface/declare-new-line/input.ts:1:8]
1 │ declare interface
· ▲
2 │ I
╰────
help: Try inserting a semicolon here
× 'abstract' modifier cannot be used here.
╭─[babel/packages/babel-parser/test/fixtures/typescript/interface/export-abstract-interface/input.ts:1:8]
1 │ export abstract interface I {
· ────────
2 │
╰────
help: Only 'declare' modifier is allowed here.
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/typescript/interface/export-default/input.ts:1:26]
1 │ export default interface {}
· ─
╰────
× TS(1051): A 'set' accessor cannot have an optional parameter.
╭─[babel/packages/babel-parser/test/fixtures/typescript/interface/get-set-invalid-optional-parameter/input.ts:2:11]
1 │ interface Foo {
2 │ set bar(foo?: string);
· ────────────
3 │ }
╰────
× A 'get' accessor must not have any formal parameters.
╭─[babel/packages/babel-parser/test/fixtures/typescript/interface/get-set-invalid-parameters/input.ts:2:10]
1 │ interface Foo {
2 │ get foo(param): string;
· ───────
3 │ set foo();
╰────
help: Remove these parameters here
× TS(1049): A 'set' accessor must have exactly one parameter.
╭─[babel/packages/babel-parser/test/fixtures/typescript/interface/get-set-invalid-parameters/input.ts:3:10]
2 │ get foo(param): string;
3 │ set foo();
· ──
4 │ }
╰────
help: Add a parameter here
× A 'set' accessor cannot have rest parameter.
╭─[babel/packages/babel-parser/test/fixtures/typescript/interface/get-set-invalid-reset-parameter/input.ts:2:11]
1 │ interface Foo {
2 │ set bar(...v);
· ────
3 │ }
╰────
× TS(1049): A 'set' accessor must have exactly one parameter.
╭─[babel/packages/babel-parser/test/fixtures/typescript/interface/get-set-invalid-reset-parameter/input.ts:2:10]
1 │ interface Foo {
2 │ set bar(...v);
· ──────
3 │ }
╰────
help: Add a parameter here
× TS(1095): A 'set' accessor cannot have a return type annotation.
╭─[babel/packages/babel-parser/test/fixtures/typescript/interface/get-set-invalid-return-types/input.ts:2:17]
1 │ interface Foo {
2 │ set foo(param): string;
· ────────
3 │ }
╰────
× TS(2784): 'get' and 'set' accessors cannot declare 'this' parameters.
╭─[babel/packages/babel-parser/test/fixtures/typescript/interface/get-set-invalid-this-parameters/input.ts:2:11]
1 │ interface Foo {
2 │ get bar(this: Foo);
· ─────────
3 │ set bar(this: Foo);
╰────
× TS(2784): 'get' and 'set' accessors cannot declare 'this' parameters.
╭─[babel/packages/babel-parser/test/fixtures/typescript/interface/get-set-invalid-this-parameters/input.ts:3:11]
2 │ get bar(this: Foo);
3 │ set bar(this: Foo);
· ─────────
4 │ }
╰────
× TS(1049): A 'set' accessor must have exactly one parameter.
╭─[babel/packages/babel-parser/test/fixtures/typescript/interface/get-set-invalid-this-parameters/input.ts:3:10]
2 │ get bar(this: Foo);
3 │ set bar(this: Foo);
· ───────────
4 │ }
╰────
help: Add a parameter here
× Expected `(` but found `<`
╭─[babel/packages/babel-parser/test/fixtures/typescript/interface/get-set-type-parameters/input.ts:2:10]
1 │ interface Foo {
2 │ get foo<T>(): string;
· ┬
· ╰── `(` expected
3 │ set bar<T>(v);
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/typescript/interface/invalid-abstract-interface/input.ts:1:9]
1 │ abstract interface
· ▲
2 │ Foo {}
╰────
help: Try inserting a semicolon here
× TS(2499): An interface can only extend an identifier/qualified-name with optional type arguments.
╭─[babel/packages/babel-parser/test/fixtures/typescript/interface/invalid-extends/input.ts:2:27]
1 │ // Every extend element here is invalid
2 │ interface Invalid extends (foo.bar), (foo).bar, foo[bar], foo?.bar, foo!.bar, foo(), import.meta {}
· ─────────
╰────
× TS(2499): An interface can only extend an identifier/qualified-name with optional type arguments.
╭─[babel/packages/babel-parser/test/fixtures/typescript/interface/invalid-extends/input.ts:2:38]
1 │ // Every extend element here is invalid
2 │ interface Invalid extends (foo.bar), (foo).bar, foo[bar], foo?.bar, foo!.bar, foo(), import.meta {}
· ─────────
╰────
× TS(2499): An interface can only extend an identifier/qualified-name with optional type arguments.
╭─[babel/packages/babel-parser/test/fixtures/typescript/interface/invalid-extends/input.ts:2:49]
1 │ // Every extend element here is invalid
2 │ interface Invalid extends (foo.bar), (foo).bar, foo[bar], foo?.bar, foo!.bar, foo(), import.meta {}
· ────────
╰────
× TS(2499): An interface can only extend an identifier/qualified-name with optional type arguments.
╭─[babel/packages/babel-parser/test/fixtures/typescript/interface/invalid-extends/input.ts:2:59]
1 │ // Every extend element here is invalid
2 │ interface Invalid extends (foo.bar), (foo).bar, foo[bar], foo?.bar, foo!.bar, foo(), import.meta {}
· ────────
╰────
× TS(2499): An interface can only extend an identifier/qualified-name with optional type arguments.
╭─[babel/packages/babel-parser/test/fixtures/typescript/interface/invalid-extends/input.ts:2:69]
1 │ // Every extend element here is invalid
2 │ interface Invalid extends (foo.bar), (foo).bar, foo[bar], foo?.bar, foo!.bar, foo(), import.meta {}
· ────────
╰────
× TS(2499): An interface can only extend an identifier/qualified-name with optional type arguments.
╭─[babel/packages/babel-parser/test/fixtures/typescript/interface/invalid-extends/input.ts:2:79]
1 │ // Every extend element here is invalid
2 │ interface Invalid extends (foo.bar), (foo).bar, foo[bar], foo?.bar, foo!.bar, foo(), import.meta {}
· ─────
╰────
× TS(2499): An interface can only extend an identifier/qualified-name with optional type arguments.
╭─[babel/packages/babel-parser/test/fixtures/typescript/interface/invalid-extends/input.ts:2:86]
1 │ // Every extend element here is invalid
2 │ interface Invalid extends (foo.bar), (foo).bar, foo[bar], foo?.bar, foo!.bar, foo(), import.meta {}
· ───────────
╰────
× Expected `(` but found `:`
╭─[babel/packages/babel-parser/test/fixtures/typescript/interface/invalid-get-properties/input.ts:2:10]
1 │ interface Foo {
2 │ get foo: string;
· ┬
· ╰── `(` expected
3 │ }
╰────
× TS(1070): 'private' modifier cannot appear on a type member.
╭─[babel/packages/babel-parser/test/fixtures/typescript/interface/invalid-modifiers-method/input.ts:2:3]
1 │ interface Foo {
2 │ private a();
· ───────
3 │ public b();
╰────
help: Only 'readonly' modifier is allowed here.
× TS(1070): 'public' modifier cannot appear on a type member.
╭─[babel/packages/babel-parser/test/fixtures/typescript/interface/invalid-modifiers-method/input.ts:3:3]
2 │ private a();
3 │ public b();
· ──────
4 │ protected c();
╰────
help: Only 'readonly' modifier is allowed here.
× TS(1070): 'protected' modifier cannot appear on a type member.
╭─[babel/packages/babel-parser/test/fixtures/typescript/interface/invalid-modifiers-method/input.ts:4:3]
3 │ public b();
4 │ protected c();
· ─────────
5 │ static d();
╰────
help: Only 'readonly' modifier is allowed here.
× TS(1070): 'static' modifier cannot appear on a type member.
╭─[babel/packages/babel-parser/test/fixtures/typescript/interface/invalid-modifiers-method/input.ts:5:3]
4 │ protected c();
5 │ static d();
· ──────
6 │ declare e();
╰────
help: Only 'readonly' modifier is allowed here.
× TS(1070): 'declare' modifier cannot appear on a type member.
╭─[babel/packages/babel-parser/test/fixtures/typescript/interface/invalid-modifiers-method/input.ts:6:3]
5 │ static d();
6 │ declare e();
· ───────
7 │ abstract f();
╰────
help: Only 'readonly' modifier is allowed here.
× TS(1070): 'abstract' modifier cannot appear on a type member.
╭─[babel/packages/babel-parser/test/fixtures/typescript/interface/invalid-modifiers-method/input.ts:7:3]
6 │ declare e();
7 │ abstract f();
· ────────
8 │ readonly g();
╰────
help: Only 'readonly' modifier is allowed here.
× TS(1024): 'readonly' modifier can only appear on a property declaration or index signature.
╭─[babel/packages/babel-parser/test/fixtures/typescript/interface/invalid-modifiers-method/input.ts:8:3]
7 │ abstract f();
8 │ readonly g();
· ────────
9 │ }
╰────
× TS(1070): 'private' modifier cannot appear on a type member.
╭─[babel/packages/babel-parser/test/fixtures/typescript/interface/invalid-modifiers-property/input.ts:2:3]
1 │ interface Foo {
2 │ private a;
· ───────
3 │ public b;
╰────
help: Only 'readonly' modifier is allowed here.
× TS(1070): 'public' modifier cannot appear on a type member.
╭─[babel/packages/babel-parser/test/fixtures/typescript/interface/invalid-modifiers-property/input.ts:3:3]
2 │ private a;
3 │ public b;
· ──────
4 │ protected c;
╰────
help: Only 'readonly' modifier is allowed here.
× TS(1070): 'protected' modifier cannot appear on a type member.
╭─[babel/packages/babel-parser/test/fixtures/typescript/interface/invalid-modifiers-property/input.ts:4:3]
3 │ public b;
4 │ protected c;
· ─────────
5 │ static d;
╰────
help: Only 'readonly' modifier is allowed here.
× TS(1070): 'static' modifier cannot appear on a type member.
╭─[babel/packages/babel-parser/test/fixtures/typescript/interface/invalid-modifiers-property/input.ts:5:3]
4 │ protected c;
5 │ static d;
· ──────
6 │ declare e;
╰────
help: Only 'readonly' modifier is allowed here.
× TS(1070): 'declare' modifier cannot appear on a type member.
╭─[babel/packages/babel-parser/test/fixtures/typescript/interface/invalid-modifiers-property/input.ts:6:3]
5 │ static d;
6 │ declare e;
· ───────
7 │ abstract f;
╰────
help: Only 'readonly' modifier is allowed here.
× TS(1070): 'abstract' modifier cannot appear on a type member.
╭─[babel/packages/babel-parser/test/fixtures/typescript/interface/invalid-modifiers-property/input.ts:7:3]
6 │ declare e;
7 │ abstract f;
· ────────
8 │ }
╰────
help: Only 'readonly' modifier is allowed here.
× Expected `(` but found `:`
╭─[babel/packages/babel-parser/test/fixtures/typescript/interface/invalid-set-properties/input.ts:2:10]
1 │ interface Foo {
2 │ set bar: string;
· ┬
· ╰── `(` expected
3 │ }
╰────
× Declaration cannot appear in a single-statement context
╭─[babel/packages/babel-parser/test/fixtures/typescript/interface/invalid-within-single-statement-context/input.ts:2:3]
1 │ for (;;)
2 │ interface I {}
· ──────────────
╰────
help: Wrap this declaration in a block statement
× The keyword 'interface' is reserved
╭─[babel/packages/babel-parser/test/fixtures/typescript/interface/new-line/input.ts:1:1]
1 │ interface
· ─────────
2 │ F
╰────
note: Modules are always strict mode code
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/typescript/interface/new-line-error/input.ts:2:2]
1 │ interface
2 │ F {}
· ▲
╰────
help: Try inserting a semicolon here
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/typescript/interface/property-initializer/input.ts:1:25]
1 │ interface I { x: number = 1;}
· ─
╰────
× TS(1063): An export assignment cannot be used in a namespace.
╭─[babel/packages/babel-parser/test/fixtures/typescript/module-namespace/invalid-body-declare-export-assignment/input.ts:2:3]
1 │ declare namespace N {
2 │ export = N;
· ───────────
3 │ }
╰────
× TS(1319): A default export can only be used in an ECMAScript-style module.
╭─[babel/packages/babel-parser/test/fixtures/typescript/module-namespace/invalid-body-declare-export-default/input.ts:3:3]
2 │ declare namespace N {
3 │ export default x;
· ─────────────────
4 │ }
╰────
× TS(1194): Export declarations are not permitted in a namespace.
╭─[babel/packages/babel-parser/test/fixtures/typescript/module-namespace/invalid-body-declare-export-from/input.ts:2:3]
1 │ declare namespace N {
2 │ export { x } from "foo";
· ────────────────────────
3 │ export * as ns from "foo";
╰────
× TS(1194): Export declarations are not permitted in a namespace.
╭─[babel/packages/babel-parser/test/fixtures/typescript/module-namespace/invalid-body-declare-export-from/input.ts:3:3]
2 │ export { x } from "foo";
3 │ export * as ns from "foo";
· ──────────────────────────
4 │ }
╰────
× TS(1147): Import declarations in a namespace cannot reference a module.
╭─[babel/packages/babel-parser/test/fixtures/typescript/module-namespace/invalid-body-declare-import/input.ts:2:3]
1 │ declare namespace N {
2 │ import "foo";
· ─────────────
3 │ import { x } from "foo";
╰────
× TS(1147): Import declarations in a namespace cannot reference a module.
╭─[babel/packages/babel-parser/test/fixtures/typescript/module-namespace/invalid-body-declare-import/input.ts:3:3]
2 │ import "foo";
3 │ import { x } from "foo";
· ────────────────────────
4 │ import * as ns from "foo";
╰────
× TS(1147): Import declarations in a namespace cannot reference a module.
╭─[babel/packages/babel-parser/test/fixtures/typescript/module-namespace/invalid-body-declare-import/input.ts:4:3]
3 │ import { x } from "foo";
4 │ import * as ns from "foo";
· ──────────────────────────
5 │ import y = require("foo");
╰────
× TS(1147): Import declarations in a namespace cannot reference a module.
╭─[babel/packages/babel-parser/test/fixtures/typescript/module-namespace/invalid-body-declare-import/input.ts:5:3]
4 │ import * as ns from "foo";
5 │ import y = require("foo");
· ──────────────────────────
6 │ import type = require("foo");
╰────
× TS(1147): Import declarations in a namespace cannot reference a module.
╭─[babel/packages/babel-parser/test/fixtures/typescript/module-namespace/invalid-body-declare-import/input.ts:6:3]
5 │ import y = require("foo");
6 │ import type = require("foo");
· ─────────────────────────────
7 │ }
╰────
× TS(1063): An export assignment cannot be used in a namespace.
╭─[babel/packages/babel-parser/test/fixtures/typescript/module-namespace/invalid-body-export-assignment/input.ts:2:3]
1 │ namespace N {
2 │ export = N;
· ───────────
3 │ }
╰────
× TS(1319): A default export can only be used in an ECMAScript-style module.
╭─[babel/packages/babel-parser/test/fixtures/typescript/module-namespace/invalid-body-export-default/input.ts:3:3]
2 │ namespace N {
3 │ export default x;
· ─────────────────
4 │ }
╰────
× TS(1194): Export declarations are not permitted in a namespace.
╭─[babel/packages/babel-parser/test/fixtures/typescript/module-namespace/invalid-body-export-from/input.ts:2:3]
1 │ namespace N {
2 │ export { x } from "foo";
· ────────────────────────
3 │ export * as ns from "foo";
╰────
× TS(1194): Export declarations are not permitted in a namespace.
╭─[babel/packages/babel-parser/test/fixtures/typescript/module-namespace/invalid-body-export-from/input.ts:3:3]
2 │ export { x } from "foo";
3 │ export * as ns from "foo";
· ──────────────────────────
4 │ }
╰────
× TS(1147): Import declarations in a namespace cannot reference a module.
╭─[babel/packages/babel-parser/test/fixtures/typescript/module-namespace/invalid-body-import/input.ts:2:3]
1 │ namespace N {
2 │ import "foo";
· ─────────────
3 │ import { x } from "foo";
╰────
× TS(1147): Import declarations in a namespace cannot reference a module.
╭─[babel/packages/babel-parser/test/fixtures/typescript/module-namespace/invalid-body-import/input.ts:3:3]
2 │ import "foo";
3 │ import { x } from "foo";
· ────────────────────────
4 │ import * as ns from "foo";
╰────
× TS(1147): Import declarations in a namespace cannot reference a module.
╭─[babel/packages/babel-parser/test/fixtures/typescript/module-namespace/invalid-body-import/input.ts:4:3]
3 │ import { x } from "foo";
4 │ import * as ns from "foo";
· ──────────────────────────
5 │ import y = require("foo");
╰────
× TS(1147): Import declarations in a namespace cannot reference a module.
╭─[babel/packages/babel-parser/test/fixtures/typescript/module-namespace/invalid-body-import/input.ts:5:3]
4 │ import * as ns from "foo";
5 │ import y = require("foo");
· ──────────────────────────
6 │ import type = require("foo");
╰────
× TS(1147): Import declarations in a namespace cannot reference a module.
╭─[babel/packages/babel-parser/test/fixtures/typescript/module-namespace/invalid-body-import/input.ts:6:3]
5 │ import y = require("foo");
6 │ import type = require("foo");
· ─────────────────────────────
7 │ }
╰────
× TS(1316): Global module exports may only appear at top level.
╭─[babel/packages/babel-parser/test/fixtures/typescript/module-namespace/invalid-body-namespace-export/input.ts:2:3]
1 │ namespace N {
2 │ export as namespace N;
· ──────────────────────
3 │ }
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/typescript/module-namespace/invalid-declare-module-number/input.ts:1:8]
1 │ declare module 0 {}
· ▲
╰────
help: Try inserting a semicolon here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/typescript/module-namespace/invalid-declare-module-without-name/input.ts:1:8]
1 │ declare module {}
· ▲
╰────
help: Try inserting a semicolon here
× TS(2670): Augmentations for the global scope should have 'declare' modifier unless they appear in already ambient context.
╭─[babel/packages/babel-parser/test/fixtures/typescript/module-namespace/invalid-global-redeclare-block-level-variable/input.ts:3:1]
2 │
3 │ global {
· ──────
4 │ let x: number;
╰────
× The keyword 'public' is reserved
╭─[babel/packages/babel-parser/test/fixtures/typescript/module-namespace/invalid-reserved-word/input.ts:1:11]
1 │ namespace public {}
· ──────
2 │
╰────
note: Modules are always strict mode code
× The keyword 'private' is reserved
╭─[babel/packages/babel-parser/test/fixtures/typescript/module-namespace/invalid-reserved-word/input.ts:3:11]
2 │
3 │ namespace private {}
· ───────
4 │
╰────
note: Modules are always strict mode code
× The keyword 'protected' is reserved
╭─[babel/packages/babel-parser/test/fixtures/typescript/module-namespace/invalid-reserved-word/input.ts:5:11]
4 │
5 │ namespace protected.foo {}
· ─────────
╰────
note: Modules are always strict mode code
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/typescript/module-namespace/module-declare-new-line/input.ts:6:8]
5 │
6 │ declare module
· ▲
7 │ 'bar'
╰────
help: Try inserting a semicolon here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/typescript/module-namespace/module-new-line-error/input.ts:2:4]
1 │ module
2 │ Foo {}
· ▲
╰────
help: Try inserting a semicolon here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/typescript/module-namespace/namespace-declare-new-line/input.ts:6:8]
5 │
6 │ declare namespace
· ▲
7 │ barbar
╰────
help: Try inserting a semicolon here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/typescript/module-namespace/namespace-new-line-error/input.ts:2:4]
1 │ namespace
2 │ Foo {}
· ▲
╰────
help: Try inserting a semicolon here
× `await` is only allowed within async functions and at the top levels of modules
╭─[babel/packages/babel-parser/test/fixtures/typescript/module-namespace/top-level-await/input.ts:2:15]
1 │ namespace N {
2 │ const x = await 42;
· ─────
3 │ }
╰────
help: Either remove this `await` or add the `async` keyword to the enclosing function
× TS(2499): An interface can only extend an identifier/qualified-name with optional type arguments.
╭─[babel/packages/babel-parser/test/fixtures/typescript/regression/keyword-qualified-type-2/input.ts:3:21]
2 │ // but they are always type-checking errors.
3 │ interface A extends this.B {}
· ──────
4 │ type T = typeof var.bar;
╰────
× Identifier expected. 'this' is a reserved word that cannot be used here.
╭─[babel/packages/babel-parser/test/fixtures/typescript/regression/keyword-qualified-type-disallowed/input.ts:2:12]
1 │ import X = Y.if;
2 │ import A = this.A;
· ────
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/typescript/regression/keyword-qualified-type-disallowed/input.ts:2:16]
1 │ import X = Y.if;
2 │ import A = this.A;
· ▲
╰────
help: Try inserting a semicolon here
× Identifier `A` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/typescript/scope/redeclaration-class-class/input.ts:1:7]
1 │ class A {}
· ┬
· ╰── `A` has already been declared here
2 │ class A {}
· ┬
· ╰── It can not be redeclared here
╰────
× Identifier `A` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/typescript/scope/redeclaration-class-enum/input.ts:1:7]
1 │ class A {}
· ┬
· ╰── `A` has already been declared here
2 │ enum A {}
· ┬
· ╰── It can not be redeclared here
╰────
× Identifier `A` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/typescript/scope/redeclaration-class-type/input.ts:1:7]
1 │ class A {}
· ┬
· ╰── `A` has already been declared here
2 │ type A = number;
· ┬
· ╰── It can not be redeclared here
╰────
× Identifier `X` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/typescript/scope/redeclaration-constenum-enum/input.ts:1:12]
1 │ const enum X {}
· ┬
· ╰── `X` has already been declared here
2 │ enum X {}
· ┬
· ╰── It can not be redeclared here
╰────
× Identifier `X` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/typescript/scope/redeclaration-enum-class/input.ts:1:6]
1 │ enum X {}
· ┬
· ╰── `X` has already been declared here
2 │ class X {}
· ┬
· ╰── It can not be redeclared here
╰────
× Identifier `X` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/typescript/scope/redeclaration-enum-constenum/input.ts:1:6]
1 │ enum X {}
· ┬
· ╰── `X` has already been declared here
2 │ const enum X {}
· ┬
· ╰── It can not be redeclared here
╰────
× Identifier `Foo` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/typescript/scope/redeclaration-enum-function/input.ts:1:6]
1 │ enum Foo {}
· ─┬─
· ╰── `Foo` has already been declared here
2 │ function Foo() {}
· ─┬─
· ╰── It can not be redeclared here
╰────
× Identifier `X` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/typescript/scope/redeclaration-enum-interface/input.ts:1:6]
1 │ enum X {}
· ┬
· ╰── `X` has already been declared here
2 │ interface X {}
· ┬
· ╰── It can not be redeclared here
╰────
× Identifier `Foo` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/typescript/scope/redeclaration-enum-let/input.ts:1:6]
1 │ enum Foo {}
· ─┬─
· ╰── `Foo` has already been declared here
2 │ let Foo;
· ─┬─
· ╰── It can not be redeclared here
╰────
× Identifier `X` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/typescript/scope/redeclaration-enum-type/input.ts:1:6]
1 │ enum X {}
· ┬
· ╰── `X` has already been declared here
2 │ type X = number;
· ┬
· ╰── It can not be redeclared here
╰────
× Identifier `Foo` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/typescript/scope/redeclaration-enum-var/input.ts:1:6]
1 │ enum Foo {}
· ─┬─
· ╰── `Foo` has already been declared here
2 │ let Foo;
· ─┬─
· ╰── It can not be redeclared here
╰────
× Identifier `Foo` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/typescript/scope/redeclaration-function-enum/input.ts:1:10]
1 │ function Foo() {}
· ─┬─
· ╰── `Foo` has already been declared here
2 │ enum Foo {}
· ─┬─
· ╰── It can not be redeclared here
╰────
× Identifier `Context` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/typescript/scope/redeclaration-import-type-import/input.ts:1:15]
1 │ import type { Context } from 'react';
· ───┬───
· ╰── `Context` has already been declared here
2 │ import { Context } from 'react';
· ───┬───
· ╰── It can not be redeclared here
╰────
× Identifier `X` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/typescript/scope/redeclaration-interface-enum/input.ts:1:11]
1 │ interface X {}
· ┬
· ╰── `X` has already been declared here
2 │ enum X {}
· ┬
· ╰── It can not be redeclared here
╰────
× Identifier `Foo` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/typescript/scope/redeclaration-let-enum/input.ts:1:5]
1 │ let Foo;
· ─┬─
· ╰── `Foo` has already been declared here
2 │ enum Foo {}
· ─┬─
· ╰── It can not be redeclared here
╰────
× Identifier `A` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/typescript/scope/redeclaration-type-class/input.ts:1:6]
1 │ type A = number;
· ┬
· ╰── `A` has already been declared here
2 │ class A {}
· ┬
· ╰── It can not be redeclared here
╰────
× Identifier `A` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/typescript/scope/redeclaration-type-enum/input.ts:1:6]
1 │ type A = number;
· ┬
· ╰── `A` has already been declared here
2 │ enum A {}
· ┬
· ╰── It can not be redeclared here
╰────
× Identifier `A` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/typescript/scope/redeclaration-type-interface/input.ts:1:6]
1 │ type A = number;
· ┬
· ╰── `A` has already been declared here
2 │ interface A {}
· ┬
· ╰── It can not be redeclared here
╰────
× Identifier `A` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/typescript/scope/redeclaration-type-type/input.ts:1:6]
1 │ type A = number;
· ┬
· ╰── `A` has already been declared here
2 │ type A = string;
· ┬
· ╰── It can not be redeclared here
╰────
× Identifier `Foo` has already been declared
╭─[babel/packages/babel-parser/test/fixtures/typescript/scope/redeclaration-var-enum/input.ts:1:5]
1 │ let Foo;
· ─┬─
· ╰── `Foo` has already been declared here
2 │ enum Foo {}
· ─┬─
· ╰── It can not be redeclared here
╰────
× TS(1184): Modifiers cannot appear here.
╭─[babel/packages/babel-parser/test/fixtures/typescript/static-blocks/invalid-static-block-with-accessibility-private-01/input.ts:2:3]
1 │ class Foo {
2 │ private static {}
· ───────
3 │ }
╰────
× TS(1029): 'private' modifier must precede 'static' modifier.
╭─[babel/packages/babel-parser/test/fixtures/typescript/static-blocks/invalid-static-block-with-accessibility-private-02/input.ts:2:10]
1 │ class Foo {
2 │ static private {}
· ───────
3 │ }
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/typescript/static-blocks/invalid-static-block-with-accessibility-private-02/input.ts:2:18]
1 │ class Foo {
2 │ static private {}
· ─
3 │ }
╰────
× TS(1184): Modifiers cannot appear here.
╭─[babel/packages/babel-parser/test/fixtures/typescript/static-blocks/invalid-static-block-with-accessibility-protected-01/input.ts:2:3]
1 │ class Foo {
2 │ protected static {}
· ─────────
3 │ }
╰────
× TS(1029): 'protected' modifier must precede 'static' modifier.
╭─[babel/packages/babel-parser/test/fixtures/typescript/static-blocks/invalid-static-block-with-accessibility-protected-02/input.ts:2:10]
1 │ class Foo {
2 │ static protected {}
· ─────────
3 │ }
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/typescript/static-blocks/invalid-static-block-with-accessibility-protected-02/input.ts:2:20]
1 │ class Foo {
2 │ static protected {}
· ─
3 │ }
╰────
× TS(1184): Modifiers cannot appear here.
╭─[babel/packages/babel-parser/test/fixtures/typescript/static-blocks/invalid-static-block-with-accessibility-public-01/input.ts:2:3]
1 │ class Foo {
2 │ public static {}
· ──────
3 │ }
╰────
× TS(1029): 'public' modifier must precede 'static' modifier.
╭─[babel/packages/babel-parser/test/fixtures/typescript/static-blocks/invalid-static-block-with-accessibility-public-02/input.ts:2:10]
1 │ class Foo {
2 │ static public {}
· ──────
3 │ }
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/typescript/static-blocks/invalid-static-block-with-accessibility-public-02/input.ts:2:17]
1 │ class Foo {
2 │ static public {}
· ─
3 │ }
╰────
× TS(1184): Modifiers cannot appear here.
╭─[babel/packages/babel-parser/test/fixtures/typescript/static-blocks/invalid-static-block-with-modifier-abstract-01/input.ts:2:3]
1 │ class Foo {
2 │ abstract static {}
· ────────
3 │ }
╰────
× TS(1243): 'static' modifier cannot be used with 'abstract' modifier.
╭─[babel/packages/babel-parser/test/fixtures/typescript/static-blocks/invalid-static-block-with-modifier-abstract-02/input.ts:2:10]
1 │ class Foo {
2 │ static abstract {}
· ────────
3 │ }
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/typescript/static-blocks/invalid-static-block-with-modifier-abstract-02/input.ts:2:19]
1 │ class Foo {
2 │ static abstract {}
· ─
3 │ }
╰────
× TS(1184): Modifiers cannot appear here.
╭─[babel/packages/babel-parser/test/fixtures/typescript/static-blocks/invalid-static-block-with-modifier-override-01/input.ts:2:3]
1 │ class Foo {
2 │ override static {}
· ────────
3 │ }
╰────
× TS(1184): Modifiers cannot appear here.
╭─[babel/packages/babel-parser/test/fixtures/typescript/static-blocks/invalid-static-block-with-modifier-override-01/invalid-static-block-with-modifier-abstract/input.ts:2:3]
1 │ class Foo {
2 │ abstract static {}
· ────────
3 │ }
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/typescript/static-blocks/invalid-static-block-with-modifier-override-02/input.ts:2:19]
1 │ class Foo {
2 │ static override {}
· ─
3 │ }
╰────
× TS(1184): Modifiers cannot appear here.
╭─[babel/packages/babel-parser/test/fixtures/typescript/static-blocks/invalid-static-block-with-modifier-static/input.ts:2:3]
1 │ class Foo {
2 │ static static {}
· ──────
3 │ }
╰────
× TS(1184): Modifiers cannot appear here.
╭─[babel/packages/babel-parser/test/fixtures/typescript/static-blocks/invalid-static-blocks-with-modifer-declare-01/input.ts:2:3]
1 │ class Foo {
2 │ declare static {}
· ───────
3 │ }
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/typescript/static-blocks/invalid-static-blocks-with-modifer-declare-02/input.ts:2:18]
1 │ class Foo {
2 │ static declare {}
· ─
3 │ }
╰────
× TS(1184): Modifiers cannot appear here.
╭─[babel/packages/babel-parser/test/fixtures/typescript/static-blocks/invalid-static-blocks-with-modifier-readonly-01/input.ts:2:3]
1 │ class Foo {
2 │ readonly static {}
· ────────
3 │ }
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/typescript/static-blocks/invalid-static-blocks-with-modifier-readonly-02/input.ts:2:19]
1 │ class Foo {
2 │ static readonly {}
· ─
3 │ }
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/typescript/tsx/anonymous-function-generator-invalid/input.ts:1:23]
1 │ const fn = function* <,>(input: T): Generator<number> {
· ─
2 │ yield 2;
╰────
× Expected `,` or `]` but found `:`
╭─[babel/packages/babel-parser/test/fixtures/typescript/tsx/cast-invalid/input.tsx:3:22]
2 │ return (
3 │ <div propA={[ key: value ]} propsB={(a: b)} />
· ┬ ┬
· │ ╰── `,` or `]` expected
· ╰── Opened here
4 │ );
╰────
× Unexpected token. Did you mean `{'>'}` or `&gt;`?
╭─[babel/packages/babel-parser/test/fixtures/typescript/tsx/invalid-gt-arrow-like/input.ts:1:8]
1 │ <T>() => {}</T>;
· ▲
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/typescript/type-alias/declare-new-line/input.ts:1:8]
1 │ declare type
· ▲
2 │ T = number
╰────
help: Try inserting a semicolon here
× Declaration cannot appear in a single-statement context
╭─[babel/packages/babel-parser/test/fixtures/typescript/type-alias/invalid-within-single-statement-context/input.ts:2:3]
1 │ for (;;)
2 │ type T = number;
· ────────────────
╰────
help: Wrap this declaration in a block statement
× Identifier expected after '?.'
╭─[babel/packages/babel-parser/test/fixtures/typescript/type-arguments/call-optional-chain-invalid/input.ts:1:2]
1 │ f?.<string>[1];
· ──
╰────
help: Add an identifier after '?.'
× TS(1099): Type argument list cannot be empty.
╭─[babel/packages/babel-parser/test/fixtures/typescript/type-arguments/empty-function/input.ts:1:4]
1 │ foo<>()
· ──
╰────
× TS(1099): Type argument list cannot be empty.
╭─[babel/packages/babel-parser/test/fixtures/typescript/type-arguments/empty-interface-extends/input.ts:1:22]
1 │ interface A extends B<> {}
· ──
╰────
× TS(1099): Type argument list cannot be empty.
╭─[babel/packages/babel-parser/test/fixtures/typescript/type-arguments/empty-interface-implements/input.ts:1:21]
1 │ class A implements B<> {}
· ──
╰────
× TS(1099): Type argument list cannot be empty.
╭─[babel/packages/babel-parser/test/fixtures/typescript/type-arguments/empty-new/input.ts:1:6]
1 │ new A<>();
· ──
╰────
× TS(1099): Type argument list cannot be empty.
╭─[babel/packages/babel-parser/test/fixtures/typescript/type-arguments/empty-superclass/input.ts:1:18]
1 │ class A extends B<> {}
· ──
╰────
× TS(1099): Type argument list cannot be empty.
╭─[babel/packages/babel-parser/test/fixtures/typescript/type-arguments/empty-tsx/input.ts:1:14]
1 │ var a = <Comp<>></Comp>
· ──
╰────
× TS(1099): Type argument list cannot be empty.
╭─[babel/packages/babel-parser/test/fixtures/typescript/type-arguments/empty-type-import/input.ts:1:18]
1 │ let a: import("")<>;
· ──
╰────
× TS(1099): Type argument list cannot be empty.
╭─[babel/packages/babel-parser/test/fixtures/typescript/type-arguments/empty-type-ref/input.ts:1:11]
1 │ let a: Foo<>;
· ──
╰────
× TS(1477): An instantiation expression cannot be followed by a property access.
╭─[babel/packages/babel-parser/test/fixtures/typescript/type-arguments/instantiation-expression-property-access/input.ts:2:1]
1 │ // invalid
2 │ a<b>.c;
· ─────
3 │ a<b>?.c;
╰────
× TS(1477): An instantiation expression cannot be followed by a property access.
╭─[babel/packages/babel-parser/test/fixtures/typescript/type-arguments/instantiation-expression-property-access/input.ts:3:1]
2 │ a<b>.c;
3 │ a<b>?.c;
· ──────
4 │ a<b>?.[c];
╰────
× TS(1477): An instantiation expression cannot be followed by a property access.
╭─[babel/packages/babel-parser/test/fixtures/typescript/type-arguments/instantiation-expression-property-access/input.ts:4:1]
3 │ a<b>?.c;
4 │ a<b>?.[c];
· ──────
5 │
╰────
× TS(1477): An instantiation expression cannot be followed by a property access.
╭─[babel/packages/babel-parser/test/fixtures/typescript/type-arguments/instantiation-expression-property-access/input.ts:13:1]
12 │ // longer, invalid
13 │ a?.b<c>.d
· ────────
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/typescript/type-arguments/new-without-arguments-missing-semicolon/input.ts:1:9]
1 │ new A<T> if (0);
· ▲
╰────
help: Try inserting a semicolon here
× TS(2207): The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.
╭─[babel/packages/babel-parser/test/fixtures/typescript/type-only-import-export-specifiers/export-invalid-type-in-type/input.ts:1:15]
1 │ export type { type foo } from "foo";
· ────
╰────
help: Remove this 'type' modifier
× Identifier expected. 'if' is a reserved word that cannot be used here.
╭─[babel/packages/babel-parser/test/fixtures/typescript/type-only-import-export-specifiers/export-invalid-type-only-keyword/input.ts:1:7]
1 │ const if = {};
· ──
2 │ export { type if };
╰────
× Keywords cannot contain escape characters
╭─[babel/packages/babel-parser/test/fixtures/typescript/type-only-import-export-specifiers/expport-invalid-escaped-type-only/input.ts:1:10]
1 │ export { typ\u0065 as } from "x";
· ─────────
╰────
× Keywords cannot contain escape characters
╭─[babel/packages/babel-parser/test/fixtures/typescript/type-only-import-export-specifiers/import-invalid-escaped-type-only/input.ts:1:10]
1 │ import { typ\u0065 as } from "x";
· ─────────
╰────
× Identifier expected. 'if' is a reserved word that cannot be used here.
╭─[babel/packages/babel-parser/test/fixtures/typescript/type-only-import-export-specifiers/import-invalid-named-type-as-keyword/input.ts:1:18]
1 │ import { type as if } from "mod";
· ──
╰────
× TS(2206): The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.
╭─[babel/packages/babel-parser/test/fixtures/typescript/type-only-import-export-specifiers/import-invalid-type-in-type/input.ts:1:15]
1 │ import type { type foo } from "foo";
· ────
╰────
help: Remove this 'type' modifier
× Identifier expected. 'if' is a reserved word that cannot be used here.
╭─[babel/packages/babel-parser/test/fixtures/typescript/type-only-import-export-specifiers/import-invalid-type-named-keywords/input.ts:1:15]
1 │ import { type if } from "./mod.js";
· ──
╰────
× Identifier expected. 'if' is a reserved word that cannot be used here.
╭─[babel/packages/babel-parser/test/fixtures/typescript/type-only-import-export-specifiers/import-invalid-type-only-as-as-keyword/input.ts:1:21]
1 │ import { type as as if } from "mod";
· ──
╰────
× Identifier expected.
╭─[babel/packages/babel-parser/test/fixtures/typescript/type-only-import-export-specifiers/import-invalid-type-only-as-string/input.ts:1:22]
1 │ import { type foo as "bar" } from "mod";
· ─────
╰────
× TS(1277): 'const' modifier can only appear on a type parameter of a function, method or class
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/const-type-parameters-invalid/input.ts:1:8]
1 │ type T<const U> = {};
· ───────
╰────
× TS(1363): A type-only import can specify a default import or named bindings, but not both.
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/import-type-declaration-error/input.ts:1:13]
1 │ import type FooDefault, { Bar, Baz } from "module";
· ──────────
╰────
× TS(1141): String literal expected.
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/import-type-dynamic-errors/input.ts:1:17]
1 │ type X = import(3);
· ─
2 │ type Y = import(`Foo`);
╰────
× TS(1141): String literal expected.
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/import-type-dynamic-errors/input.ts:2:17]
1 │ type X = import(3);
2 │ type Y = import(`Foo`);
· ─────
3 │ type Z = import(Y);
╰────
× TS(1141): String literal expected.
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/import-type-dynamic-errors/input.ts:3:17]
2 │ type Y = import(`Foo`);
3 │ type Z = import(Y);
· ─
╰────
× Keywords cannot contain escape characters
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/import-type-escaped-error/input.ts:1:8]
1 │ import typ\u{65} typescript from "typescript";
· ─────────
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/intrinsic-keyword-error/input.ts:1:21]
1 │ type Foo = intrinsic["foo"];
· ▲
2 │
╰────
help: Try inserting a semicolon here
× Expected `{` but found `<`
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/invalid-import-type-dynamic-with-jsx-options/input.ts:1:34]
1 │ let x: typeof import("foo.json", <ImportOptionBagJSX type="json"/>)
· ┬
· ╰── `{` expected
╰────
× Expected 'with' in import type options
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/invalid-import-type-options-escaped-with/input.ts:1:36]
1 │ let x: typeof import("foo.json", { w\u0069th: { type: "json" } });
· ─────────
╰────
× Keywords cannot contain escape characters
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/invalid-import-type-options-escaped-with/input.ts:1:36]
1 │ let x: typeof import("foo.json", { w\u0069th: { type: "json" } });
· ─────────
╰────
× Expected 'with' in import type options
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/invalid-import-type-options-string-with/input.ts:1:36]
1 │ let x: typeof import("foo.json", { "with": { type: "json" } });
· ──────
╰────
× Expected `)` but found `,`
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/invalid-import-type-options-trailing-comma/input.ts:1:60]
1 │ let x: typeof import("foo.json", { with: { type: "json" } }, )
· ┬
· ╰── `)` expected
╰────
× Import attributes keys must be identifier or string literal.
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/invalid-import-type-options-with-computed-properties/input.ts:1:44]
1 │ let x: typeof import("foo.json", { with: { ["type"]: "json" } });
· ─
╰────
× Spread elements are not allowed in import type options.
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/invalid-import-type-options-with-spread-element/input.ts:1:58]
1 │ let x: typeof import("foo.json", { with: { type: "json", ...attributes } });
· ───
╰────
× Expected `{` but found `)`
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/invalid-import-type-trailing-comma/input.ts:1:34]
1 │ let x: typeof import("foo.json", )
· ┬
· ╰── `{` expected
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/literal-string-3/input.ts:1:19]
1 │ let x: `foo-${bar + baz}`;
· ─
╰────
× Unexpected token
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/mapped-as-invalid/input.ts:1:33]
1 │ type Foo<T> = { [K in keyof T as]: T[K] };
· ─
╰────
× Expected `,` or `]` but found `:`
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/no-annotation-in-destructuring/input.ts:1:7]
1 │ let [a: number] = b;
· ┬ ┬
· │ ╰── `,` or `]` expected
· ╰── Opened here
╰────
× Expected `,` or `]` but found `:`
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/no-optional-in-destructuring/input.ts:1:7]
1 │ let [a: number] = b;
· ┬ ┬
· │ ╰── `,` or `]` expected
· ╰── Opened here
╰────
× Expected `,` or `]` but found `:`
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/no-optional-in-destructuring-in-params/input.ts:1:14]
1 │ function f([a: number]) {}
· ┬ ┬
· │ ╰── `,` or `]` expected
· ╰── Opened here
╰────
× TS(1354): 'readonly' type modifier is only permitted on array and tuple literal types.
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/read-only-1/input.ts:1:12]
1 │ type T30 = readonly string; // Error
· ────────
╰────
× TS(1354): 'readonly' type modifier is only permitted on array and tuple literal types.
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/read-only-2/input.ts:1:12]
1 │ type T31 = readonly T; // Error
· ────────
╰────
× TS(1354): 'readonly' type modifier is only permitted on array and tuple literal types.
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/read-only-3/input.ts:1:12]
1 │ type T32 = readonly readonly string[]; // Error
· ────────
╰────
× TS(1354): 'readonly' type modifier is only permitted on array and tuple literal types.
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/read-only-4/input.ts:1:12]
1 │ type T33 = readonly Array<string>; // Error
· ────────
╰────
× Expected `,` or `]` but found `:`
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/tuple-invalid-label-1/input.ts:1:14]
1 │ type T = [x.y: A];
· ┬ ┬
· │ ╰── `,` or `]` expected
· ╰── Opened here
╰────
× Expected `,` or `]` but found `:`
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/tuple-invalid-label-2/input.ts:1:15]
1 │ type T = [x<y>: A];
· ┬ ┬
· │ ╰── `,` or `]` expected
· ╰── Opened here
╰────
× TS(5086): A labeled tuple element is declared as optional with a question mark after the name and before the colon, rather than after the type.
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/tuple-labeled-invalid-optional/input.ts:1:14]
1 │ type T = [x: A?];
· ──
╰────
× TS(1257): A required element cannot follow an optional element.
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/tuple-optional-invalid/input.ts:1:9]
1 │ let x: [string?, number]
· ───┬─── ───┬──
· │ ╰── Required element here
· ╰── Optional element seen here
╰────
× TS(1257): A required element cannot follow an optional element.
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/tuple-required-after-labeled-optional/input.ts:1:11]
1 │ type T = [x?: A, y: B];
· ──┬── ──┬─
· │ ╰── Required element here
· ╰── Optional element seen here
╰────
× TS(1273): 'public' modifier cannot be used on a type parameter.
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/variance-annotations/input.ts:95:10]
94 │
95 │ type T20<public T> = T; // Error
· ──────
96 │ type T21<in out in T> = T; // Error
╰────
× TS(1030): 'in' modifier already seen.
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/variance-annotations/input.ts:96:17]
95 │ type T20<public T> = T; // Error
96 │ type T21<in out in T> = T; // Error
· ──
97 │ type T22<in out out T> = T; // Error
╰────
help: Remove the duplicate modifier.
× TS(1030): 'out' modifier already seen.
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/variance-annotations/input.ts:97:17]
96 │ type T21<in out in T> = T; // Error
97 │ type T22<in out out T> = T; // Error
· ───
98 │ type T23<out in T> = T; // Error
╰────
help: Remove the duplicate modifier.
× TS(1274): 'in' modifier can only appear on a type parameter of a class, interface or type alias.
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/variance-annotations/input.ts:100:21]
99 │
100 │ declare function f1<in T>(x: T): void; // Error
· ──
101 │ declare function f2<out T>(): T; // Error
╰────
× TS(1274): 'out' modifier can only appear on a type parameter of a class, interface or type alias.
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/variance-annotations/input.ts:101:21]
100 │ declare function f1<in T>(x: T): void; // Error
101 │ declare function f2<out T>(): T; // Error
· ───
102 │
╰────
× TS(1274): 'in' modifier can only appear on a type parameter of a class, interface or type alias.
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/variance-annotations/input.ts:104:5]
103 │ class C {
104 │ in a = 0; // Error
· ──
105 │ out b = 0; // Error
╰────
× TS(1274): 'out' modifier can only appear on a type parameter of a class, interface or type alias.
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/variance-annotations/input.ts:105:5]
104 │ in a = 0; // Error
105 │ out b = 0; // Error
· ───
106 │ }
╰────
× Unexpected token. Did you mean `{'>'}` or `&gt;`?
╭─[babel/packages/babel-parser/test/fixtures/typescript/types/variance-annotations-with-jsx/input.tsx:2:11]
1 │ // valid JSX
2 │ <in T>() => {}</in>;
· ▲
3 │
╰────
× Expected `]` but found `EOF`
╭─[babel/packages/babel-parser/test/fixtures/typescript/types-arrow-function/invalid-incomplete-array-like/input.ts:2:1]
1 │ type F = ([
╰────
× Expected `}` but found `EOF`
╭─[babel/packages/babel-parser/test/fixtures/typescript/types-arrow-function/invalid-incomplete-object-like/input.ts:2:1]
1 │ type F = ({
· ┬
· ╰── Opened here
╰────
× Missing initializer in const declaration
╭─[babel/packages/babel-parser/test/fixtures/typescript/variable-declarator/definite-with-type/input.ts:3:7]
2 │ let x!: number;
3 │ const y!: number;
· ─
4 │ {
╰────
help: Add an initializer (e.g. ` = undefined`) here
× Using declarations must have an initializer.
╭─[babel/packages/babel-parser/test/fixtures/typescript/variable-declarator/definite-with-type/input.ts:5:9]
4 │ {
5 │ using z!: number;
· ─
6 │ await using za!: number;
╰────
help: Add an initializer (e.g. ` = undefined`) here
× Using declarations must have an initializer.
╭─[babel/packages/babel-parser/test/fixtures/typescript/variable-declarator/definite-with-type/input.ts:6:15]
5 │ using z!: number;
6 │ await using za!: number;
· ──
7 │ }
╰────
help: Add an initializer (e.g. ` = undefined`) here
× TS(1263): Declarations with initializers cannot also have definite assignment assertions.
╭─[babel/packages/babel-parser/test/fixtures/typescript/variable-declarator/invalid-definite-assignment/input.ts:1:6]
1 │ var w!: number = 1;
· ─
2 │ let x!: number = 1;
╰────
× TS(1263): Declarations with initializers cannot also have definite assignment assertions.
╭─[babel/packages/babel-parser/test/fixtures/typescript/variable-declarator/invalid-definite-assignment/input.ts:2:6]
1 │ var w!: number = 1;
2 │ let x!: number = 1;
· ─
3 │ const y!: number = 1;
╰────
× TS(1263): Declarations with initializers cannot also have definite assignment assertions.
╭─[babel/packages/babel-parser/test/fixtures/typescript/variable-declarator/invalid-definite-assignment/input.ts:3:8]
2 │ let x!: number = 1;
3 │ const y!: number = 1;
· ─
4 │ {
╰────
× TS(1263): Declarations with initializers cannot also have definite assignment assertions.
╭─[babel/packages/babel-parser/test/fixtures/typescript/variable-declarator/invalid-definite-assignment/input.ts:5:10]
4 │ {
5 │ using z!: number = 1;
· ─
6 │ await using za!: number = 1;
╰────
× TS(1263): Declarations with initializers cannot also have definite assignment assertions.
╭─[babel/packages/babel-parser/test/fixtures/typescript/variable-declarator/invalid-definite-assignment/input.ts:6:17]
5 │ using z!: number = 1;
6 │ await using za!: number = 1;
· ─
7 │ }
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/typescript/variable-declarator/invalid-definite-like-not-eq/input.ts:1:6]
1 │ var w!=null;
· ▲
╰────
help: Try inserting a semicolon here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/typescript/variable-declarator/invalid-definite-pattern-assignment-await-using/input.ts:2:14]
1 │ {
2 │ await using {}! = {};
· ▲
3 │ }
╰────
help: Try inserting a semicolon here
× Missing initializer in destructuring declaration
╭─[babel/packages/babel-parser/test/fixtures/typescript/variable-declarator/invalid-definite-pattern-assignment-const/input.ts:1:7]
1 │ const {}! = {};
· ──
╰────
help: Add an initializer (e.g. ` = undefined`) here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/typescript/variable-declarator/invalid-definite-pattern-assignment-const/input.ts:1:9]
1 │ const {}! = {};
· ▲
╰────
help: Try inserting a semicolon here
× Missing initializer in destructuring declaration
╭─[babel/packages/babel-parser/test/fixtures/typescript/variable-declarator/invalid-definite-pattern-assignment-let/input.ts:1:5]
1 │ let {}! = {};
· ──
╰────
help: Add an initializer (e.g. ` = undefined`) here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/typescript/variable-declarator/invalid-definite-pattern-assignment-let/input.ts:1:7]
1 │ let {}! = {};
· ▲
╰────
help: Try inserting a semicolon here
× Missing initializer in destructuring declaration
╭─[babel/packages/babel-parser/test/fixtures/typescript/variable-declarator/invalid-definite-pattern-assignment-using/input.ts:2:9]
1 │ {
2 │ using {}! = {};
· ──
3 │ }
╰────
help: Add an initializer (e.g. ` = undefined`) here
× Using declarations may not have binding patterns.
╭─[babel/packages/babel-parser/test/fixtures/typescript/variable-declarator/invalid-definite-pattern-assignment-using/input.ts:2:9]
1 │ {
2 │ using {}! = {};
· ──
3 │ }
╰────
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/typescript/variable-declarator/invalid-definite-pattern-assignment-using/input.ts:2:11]
1 │ {
2 │ using {}! = {};
· ▲
3 │ }
╰────
help: Try inserting a semicolon here
× Missing initializer in destructuring declaration
╭─[babel/packages/babel-parser/test/fixtures/typescript/variable-declarator/invalid-definite-pattern-assignment-var/input.ts:1:5]
1 │ var {}! = {};
· ──
╰────
help: Add an initializer (e.g. ` = undefined`) here
× Expected a semicolon or an implicit semicolon after a statement, but found none
╭─[babel/packages/babel-parser/test/fixtures/typescript/variable-declarator/invalid-definite-pattern-assignment-var/input.ts:1:7]
1 │ var {}! = {};
· ▲
╰────
help: Try inserting a semicolon here
× TS(1264): Declarations with definite assignment assertions must also have type annotations.
╭─[babel/packages/babel-parser/test/fixtures/typescript/variable-declarator/invalid-definite-without-type/input.ts:1:6]
1 │ var w!;
· ─
2 │ let x!;
╰────
× TS(1264): Declarations with definite assignment assertions must also have type annotations.
╭─[babel/packages/babel-parser/test/fixtures/typescript/variable-declarator/invalid-definite-without-type/input.ts:2:6]
1 │ var w!;
2 │ let x!;
· ─
3 │ const y!;
╰────
× Missing initializer in const declaration
╭─[babel/packages/babel-parser/test/fixtures/typescript/variable-declarator/invalid-definite-without-type/input.ts:3:7]
2 │ let x!;
3 │ const y!;
· ─
4 │ {
╰────
help: Add an initializer (e.g. ` = undefined`) here
× TS(1264): Declarations with definite assignment assertions must also have type annotations.
╭─[babel/packages/babel-parser/test/fixtures/typescript/variable-declarator/invalid-definite-without-type/input.ts:3:8]
2 │ let x!;
3 │ const y!;
· ─
4 │ {
╰────
× Using declarations must have an initializer.
╭─[babel/packages/babel-parser/test/fixtures/typescript/variable-declarator/invalid-definite-without-type/input.ts:5:9]
4 │ {
5 │ using z!;
· ─
6 │ await using za!;
╰────
help: Add an initializer (e.g. ` = undefined`) here
× TS(1264): Declarations with definite assignment assertions must also have type annotations.
╭─[babel/packages/babel-parser/test/fixtures/typescript/variable-declarator/invalid-definite-without-type/input.ts:5:10]
4 │ {
5 │ using z!;
· ─
6 │ await using za!;
╰────
× Using declarations must have an initializer.
╭─[babel/packages/babel-parser/test/fixtures/typescript/variable-declarator/invalid-definite-without-type/input.ts:6:15]
5 │ using z!;
6 │ await using za!;
· ──
7 │ }
╰────
help: Add an initializer (e.g. ` = undefined`) here
× TS(1264): Declarations with definite assignment assertions must also have type annotations.
╭─[babel/packages/babel-parser/test/fixtures/typescript/variable-declarator/invalid-definite-without-type/input.ts:6:17]
5 │ using z!;
6 │ await using za!;
· ─
7 │ }
╰────