From 4c5e7b9d638c47189b3141d838ad9b14e02d8f10 Mon Sep 17 00:00:00 2001 From: fisker Cheung Date: Tue, 18 Aug 2026 17:36:22 +0800 Subject: [PATCH] Add `yuku-ts` to error tests (#19852) --- .../__snapshots__/format.test.js.snap | 16 + .../format.test.js | 2 +- .../__snapshots__/format.test.js.snap | 8 + .../format.test.js | 2 +- .../arrow/__snapshots__/format.test.js.snap | 8 + .../typescript/_errors_/arrow/format.test.js | 2 +- .../__snapshots__/format.test.js.snap | 10 + .../format.test.js | 2 +- .../__snapshots__/format.test.js.snap | 48 + .../format.test.js | 2 +- .../__snapshots__/format.test.js.snap | 18 + .../_errors_/declare-accessor/format.test.js | 2 +- .../__snapshots__/format.test.js.snap | 6 + .../declare-function-with-body/format.test.js | 2 +- .../__snapshots__/format.test.js.snap | 108 ++ .../format.test.js | 2 +- .../__snapshots__/format.test.js.snap | 36 + .../format.test.js | 2 +- .../__snapshots__/format.test.js.snap | 120 ++ .../format.test.js | 2 +- .../enum/__snapshots__/format.test.js.snap | 48 + .../typescript/_errors_/enum/format.test.js | 3 +- .../__snapshots__/format.test.js.snap | 7 + .../_errors_/export-declare/format.test.js | 2 +- .../__snapshots__/format.test.js.snap | 7 + .../_errors_/import-attributes/format.test.js | 2 +- .../__snapshots__/format.test.js.snap | 16 + .../_errors_/import-reflection/format.test.js | 2 +- .../__snapshots__/format.test.js.snap | 18 + .../_errors_/interface/format.test.js | 2 +- .../__snapshots__/format.test.js.snap | 24 + .../invalid-class-implements/format.test.js | 2 +- .../_errors_/invalid-define/format.test.js | 27 - .../__snapshots__/format.test.js.snap | 96 +- .../_errors_/invalid-definite/format.test.js | 14 + .../__snapshots__/format.test.js.snap | 12 + .../invalid-import-equals/format.test.js | 7 +- .../__snapshots__/format.test.js.snap | 72 + .../invalid-interface-extends/format.test.js | 2 +- .../__snapshots__/format.test.js.snap | 18 + .../format.test.js | 11 +- .../__snapshots__/format.test.js.snap | 96 + .../format.test.js | 2 +- .../jsx/__snapshots__/format.test.js.snap | 9 + .../typescript/_errors_/jsx/format.test.js | 2 +- .../loop/__snapshots__/format.test.js.snap | 18 + .../typescript/_errors_/loop/format.test.js | 2 +- .../__snapshots__/format.test.js.snap | 10 + .../_errors_/mapped-type/format.test.js | 2 +- .../__snapshots__/format.test.js.snap | 1576 +++++++++++++++++ .../_errors_/modifiers/format.test.js | 2 +- .../__snapshots__/format.test.js.snap | 18 + .../module-declaration/format.test.js | 2 +- .../tuple/__snapshots__/format.test.js.snap | 44 +- .../typescript/_errors_/tuple/format.test.js | 4 +- .../__snapshots__/format.test.js.snap | 18 + .../_errors_/type-only-import/format.test.js | 3 +- .../__snapshots__/format.test.js.snap | 9 + .../value-of-abstract-property/format.test.js | 2 +- 59 files changed, 2517 insertions(+), 92 deletions(-) delete mode 100644 tests/format/typescript/_errors_/invalid-define/format.test.js rename tests/format/typescript/_errors_/{invalid-define => invalid-definite}/__snapshots__/format.test.js.snap (69%) create mode 100644 tests/format/typescript/_errors_/invalid-definite/format.test.js diff --git a/tests/format/typescript/_errors_/abstract-accessor-with-implementation/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/abstract-accessor-with-implementation/__snapshots__/format.test.js.snap index 22c3e3363..c2ff9c494 100644 --- a/tests/format/typescript/_errors_/abstract-accessor-with-implementation/__snapshots__/format.test.js.snap +++ b/tests/format/typescript/_errors_/abstract-accessor-with-implementation/__snapshots__/format.test.js.snap @@ -26,6 +26,14 @@ exports[`snippet: #0 format[typescript] 1`] = ` Cause: An abstract accessor cannot have an implementation." `; +exports[`snippet: #0 format[yuku-ts] 1`] = ` +"An abstract accessor cannot have an implementation (2:25) + 1 | abstract class Foo { +> 2 | abstract get getter() { } + | ^^^ + 3 | }" +`; + exports[`snippet: #1 format[babel-ts] 1`] = ` "Method 'setter' cannot have an implementation because it is marked abstract. (2:3) 1 | abstract class Foo { @@ -51,3 +59,11 @@ exports[`snippet: #1 format[typescript] 1`] = ` 3 | } Cause: An abstract accessor cannot have an implementation." `; + +exports[`snippet: #1 format[yuku-ts] 1`] = ` +"An abstract accessor cannot have an implementation (2:26) + 1 | abstract class Foo { +> 2 | abstract set setter(v) { } + | ^^^ + 3 | }" +`; diff --git a/tests/format/typescript/_errors_/abstract-accessor-with-implementation/format.test.js b/tests/format/typescript/_errors_/abstract-accessor-with-implementation/format.test.js index 2b4879d5b..53b69417c 100644 --- a/tests/format/typescript/_errors_/abstract-accessor-with-implementation/format.test.js +++ b/tests/format/typescript/_errors_/abstract-accessor-with-implementation/format.test.js @@ -16,5 +16,5 @@ runFormatTest( `, ], }, - ["typescript", "babel-ts", "oxc-ts"], + ["typescript", "babel-ts", "oxc-ts", "yuku-ts"], ); diff --git a/tests/format/typescript/_errors_/abstract-method-with-implementation/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/abstract-method-with-implementation/__snapshots__/format.test.js.snap index f1ee0216c..c204db362 100644 --- a/tests/format/typescript/_errors_/abstract-method-with-implementation/__snapshots__/format.test.js.snap +++ b/tests/format/typescript/_errors_/abstract-method-with-implementation/__snapshots__/format.test.js.snap @@ -25,3 +25,11 @@ exports[`snippet: #0 format[typescript] 1`] = ` 3 | } Cause: Method 'method' cannot have an implementation because it is marked abstract." `; + +exports[`snippet: #0 format[yuku-ts] 1`] = ` +"An abstract method cannot have an implementation (2:21) + 1 | abstract class Foo { +> 2 | abstract method() { } + | ^^^ + 3 | }" +`; diff --git a/tests/format/typescript/_errors_/abstract-method-with-implementation/format.test.js b/tests/format/typescript/_errors_/abstract-method-with-implementation/format.test.js index 103ff63f9..dd382093b 100644 --- a/tests/format/typescript/_errors_/abstract-method-with-implementation/format.test.js +++ b/tests/format/typescript/_errors_/abstract-method-with-implementation/format.test.js @@ -11,5 +11,5 @@ runFormatTest( `, ], }, - ["typescript", "babel-ts", "oxc-ts"], + ["typescript", "babel-ts", "oxc-ts", "yuku-ts"], ); diff --git a/tests/format/typescript/_errors_/arrow/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/arrow/__snapshots__/format.test.js.snap index df6cbda10..6323d8531 100644 --- a/tests/format/typescript/_errors_/arrow/__snapshots__/format.test.js.snap +++ b/tests/format/typescript/_errors_/arrow/__snapshots__/format.test.js.snap @@ -25,3 +25,11 @@ exports[`newline-before-arrow.ts format[typescript] 1`] = ` 3 | Cause: Unexpected keyword or identifier." `; + +exports[`newline-before-arrow.ts format[yuku-ts] 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found 'x' (1:7) +> 1 | async x + | ^ + 2 | => x + 3 |" +`; diff --git a/tests/format/typescript/_errors_/arrow/format.test.js b/tests/format/typescript/_errors_/arrow/format.test.js index 1831abd0d..f78aea343 100644 --- a/tests/format/typescript/_errors_/arrow/format.test.js +++ b/tests/format/typescript/_errors_/arrow/format.test.js @@ -1 +1 @@ -runFormatTest(import.meta, ["typescript", "babel-ts", "oxc-ts"]); +runFormatTest(import.meta, ["typescript", "babel-ts", "oxc-ts", "yuku-ts"]); diff --git a/tests/format/typescript/_errors_/catch-clause-with-initializer/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/catch-clause-with-initializer/__snapshots__/format.test.js.snap index 14f5bbbca..79623eb12 100644 --- a/tests/format/typescript/_errors_/catch-clause-with-initializer/__snapshots__/format.test.js.snap +++ b/tests/format/typescript/_errors_/catch-clause-with-initializer/__snapshots__/format.test.js.snap @@ -31,3 +31,13 @@ exports[`catch-clause-with-initializer.ts format[typescript] 1`] = ` 5 | Cause: Catch clause variable cannot have an initializer." `; + +exports[`catch-clause-with-initializer.ts format[yuku-ts] 1`] = ` +"Expected ')' after catch parameter, but found '=' (3:10) + 1 | try { + 2 | } +> 3 | catch (e = 1) { + | ^ + 4 | } + 5 |" +`; diff --git a/tests/format/typescript/_errors_/catch-clause-with-initializer/format.test.js b/tests/format/typescript/_errors_/catch-clause-with-initializer/format.test.js index 1831abd0d..f78aea343 100644 --- a/tests/format/typescript/_errors_/catch-clause-with-initializer/format.test.js +++ b/tests/format/typescript/_errors_/catch-clause-with-initializer/format.test.js @@ -1 +1 @@ -runFormatTest(import.meta, ["typescript", "babel-ts", "oxc-ts"]); +runFormatTest(import.meta, ["typescript", "babel-ts", "oxc-ts", "yuku-ts"]); diff --git a/tests/format/typescript/_errors_/class-property-named-constructor/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/class-property-named-constructor/__snapshots__/format.test.js.snap index 235f85227..f8774f11e 100644 --- a/tests/format/typescript/_errors_/class-property-named-constructor/__snapshots__/format.test.js.snap +++ b/tests/format/typescript/_errors_/class-property-named-constructor/__snapshots__/format.test.js.snap @@ -26,6 +26,14 @@ exports[`snippet: #0 format[typescript] 1`] = ` Cause: '(' expected." `; +exports[`snippet: #0 format[yuku-ts] 1`] = ` +"Expected '(' for getter/setter definition, but found '}' (3:1) + 1 | abstract class Foo { + 2 | constructor +> 3 | } + | ^" +`; + exports[`snippet: #1 format[babel-ts] 1`] = ` "Classes may not have a field named 'constructor'. (2:3) 1 | abstract class Foo { @@ -52,6 +60,14 @@ exports[`snippet: #1 format[typescript] 1`] = ` Cause: Classes may not have a field named 'constructor'." `; +exports[`snippet: #1 format[yuku-ts] 1`] = ` +"Expected '(' for getter/setter definition, but found '}' (3:1) + 1 | abstract class Foo { + 2 | 'constructor' +> 3 | } + | ^" +`; + exports[`snippet: #2 format[babel-ts] 1`] = ` "Classes may not have a field named 'constructor'. (2:3) 1 | abstract class Foo { @@ -78,6 +94,14 @@ exports[`snippet: #2 format[typescript] 1`] = ` Cause: Classes may not have a field named 'constructor'." `; +exports[`snippet: #2 format[yuku-ts] 1`] = ` +"Expected '(' for getter/setter definition, but found '}' (3:1) + 1 | abstract class Foo { + 2 | 'constructor' +> 3 | } + | ^" +`; + exports[`snippet: #3 format[babel-ts] 1`] = ` "Classes may not have a field named 'constructor'. (2:12) 1 | abstract class Foo { @@ -104,6 +128,14 @@ exports[`snippet: #3 format[typescript] 1`] = ` Cause: Classes may not have a field named 'constructor'." `; +exports[`snippet: #3 format[yuku-ts] 1`] = ` +"Expected '(' for getter/setter definition, but found '}' (3:1) + 1 | abstract class Foo { + 2 | accessor 'constructor' +> 3 | } + | ^" +`; + exports[`snippet: #4 format[babel-ts] 1`] = ` "Classes may not have a field named 'constructor'. (2:12) 1 | abstract class Foo { @@ -130,6 +162,14 @@ exports[`snippet: #4 format[typescript] 1`] = ` Cause: Classes may not have a field named 'constructor'." `; +exports[`snippet: #4 format[yuku-ts] 1`] = ` +"Expected '(' for getter/setter definition, but found '}' (3:1) + 1 | abstract class Foo { + 2 | accessor 'constructor' +> 3 | } + | ^" +`; + exports[`snippet: #5 format[babel-ts] 1`] = ` "Classes may not have a field named 'constructor'. (2:12) 1 | abstract class Foo { @@ -155,3 +195,11 @@ exports[`snippet: #5 format[typescript] 1`] = ` | ^ Cause: '(' expected." `; + +exports[`snippet: #5 format[yuku-ts] 1`] = ` +"Expected '(' for getter/setter definition, but found '}' (3:1) + 1 | abstract class Foo { + 2 | accessor constructor +> 3 | } + | ^" +`; diff --git a/tests/format/typescript/_errors_/class-property-named-constructor/format.test.js b/tests/format/typescript/_errors_/class-property-named-constructor/format.test.js index 71add1816..8f49bfceb 100644 --- a/tests/format/typescript/_errors_/class-property-named-constructor/format.test.js +++ b/tests/format/typescript/_errors_/class-property-named-constructor/format.test.js @@ -5,5 +5,5 @@ runFormatTest( importMeta: import.meta, snippets: testCases.map((code) => `abstract ${code}`), }, - ["typescript", "babel-ts", "oxc-ts"], + ["typescript", "babel-ts", "oxc-ts", "yuku-ts"], ); diff --git a/tests/format/typescript/_errors_/declare-accessor/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/declare-accessor/__snapshots__/format.test.js.snap index 8ed932803..862dff6c7 100644 --- a/tests/format/typescript/_errors_/declare-accessor/__snapshots__/format.test.js.snap +++ b/tests/format/typescript/_errors_/declare-accessor/__snapshots__/format.test.js.snap @@ -29,6 +29,15 @@ exports[`declare-getter.ts format[typescript] 1`] = ` Cause: 'declare' modifier cannot appear on class elements of this kind." `; +exports[`declare-getter.ts format[yuku-ts] 1`] = ` +"A 'declare' modifier cannot appear on a class element of this kind (2:15) + 1 | class Foo { +> 2 | declare get foo() + | ^^^ + 3 | } + 4 |" +`; + exports[`declare-setter.ts format[babel-ts] 1`] = ` "'declare' is not allowed in setters. (2:3) 1 | class Foo { @@ -57,3 +66,12 @@ exports[`declare-setter.ts format[typescript] 1`] = ` 4 | Cause: 'declare' modifier cannot appear on class elements of this kind." `; + +exports[`declare-setter.ts format[yuku-ts] 1`] = ` +"A 'declare' modifier cannot appear on a class element of this kind (2:15) + 1 | class Foo { +> 2 | declare set foo(v) + | ^^^ + 3 | } + 4 |" +`; diff --git a/tests/format/typescript/_errors_/declare-accessor/format.test.js b/tests/format/typescript/_errors_/declare-accessor/format.test.js index 1831abd0d..f78aea343 100644 --- a/tests/format/typescript/_errors_/declare-accessor/format.test.js +++ b/tests/format/typescript/_errors_/declare-accessor/format.test.js @@ -1 +1 @@ -runFormatTest(import.meta, ["typescript", "babel-ts", "oxc-ts"]); +runFormatTest(import.meta, ["typescript", "babel-ts", "oxc-ts", "yuku-ts"]); diff --git a/tests/format/typescript/_errors_/declare-function-with-body/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/declare-function-with-body/__snapshots__/format.test.js.snap index ba3ac3269..7e4117045 100644 --- a/tests/format/typescript/_errors_/declare-function-with-body/__snapshots__/format.test.js.snap +++ b/tests/format/typescript/_errors_/declare-function-with-body/__snapshots__/format.test.js.snap @@ -19,3 +19,9 @@ exports[`snippet: #0 format[typescript] 1`] = ` | ^^^^^^^^^^^^^^^^^^^^^^^^^ Cause: An implementation cannot be declared in ambient contexts." `; + +exports[`snippet: #0 format[yuku-ts] 1`] = ` +"An implementation cannot be declared in ambient contexts (1:24) +> 1 | declare function foo() {} + | ^" +`; diff --git a/tests/format/typescript/_errors_/declare-function-with-body/format.test.js b/tests/format/typescript/_errors_/declare-function-with-body/format.test.js index 399fe2561..e4916992c 100644 --- a/tests/format/typescript/_errors_/declare-function-with-body/format.test.js +++ b/tests/format/typescript/_errors_/declare-function-with-body/format.test.js @@ -3,5 +3,5 @@ runFormatTest( importMeta: import.meta, snippets: ["declare function foo() {}"], }, - ["typescript", "babel-ts", "oxc-ts"], + ["typescript", "babel-ts", "oxc-ts", "yuku-ts"], ); diff --git a/tests/format/typescript/_errors_/decrement-and-increment-operators/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/decrement-and-increment-operators/__snapshots__/format.test.js.snap index 68f2c978b..28c15672e 100644 --- a/tests/format/typescript/_errors_/decrement-and-increment-operators/__snapshots__/format.test.js.snap +++ b/tests/format/typescript/_errors_/decrement-and-increment-operators/__snapshots__/format.test.js.snap @@ -20,6 +20,12 @@ exports[`snippet: #0 format[typescript] 1`] = ` Cause: Invalid left-hand side expression in unary operation" `; +exports[`snippet: #0 format[yuku-ts] 1`] = ` +"Invalid operand for increment/decrement operator (1:1) +> 1 | 1 ++ + | ^" +`; + exports[`snippet: #1 format[babel-ts] 1`] = ` "Invalid left-hand side in postfix operation. (1:2) > 1 | (1)++ @@ -40,6 +46,12 @@ exports[`snippet: #1 format[typescript] 1`] = ` Cause: Invalid left-hand side expression in unary operation" `; +exports[`snippet: #1 format[yuku-ts] 1`] = ` +"Invalid operand for increment/decrement operator (1:1) +> 1 | (1)++ + | ^^^" +`; + exports[`snippet: #2 format[babel-ts] 1`] = ` "Invalid left-hand side in postfix operation. (1:2) > 1 | (1)-- @@ -60,6 +72,12 @@ exports[`snippet: #2 format[typescript] 1`] = ` Cause: Invalid left-hand side expression in unary operation" `; +exports[`snippet: #2 format[yuku-ts] 1`] = ` +"Invalid operand for increment/decrement operator (1:1) +> 1 | (1)-- + | ^^^" +`; + exports[`snippet: #3 format[babel-ts] 1`] = ` "Invalid left-hand side in prefix operation. (1:4) > 1 | ++(1) @@ -80,6 +98,12 @@ exports[`snippet: #3 format[typescript] 1`] = ` Cause: Invalid left-hand side expression in unary operation" `; +exports[`snippet: #3 format[yuku-ts] 1`] = ` +"Invalid operand for increment/decrement operator (1:3) +> 1 | ++(1) + | ^^^" +`; + exports[`snippet: #4 format[babel-ts] 1`] = ` "Invalid left-hand side in prefix operation. (1:4) > 1 | --(1) @@ -100,6 +124,12 @@ exports[`snippet: #4 format[typescript] 1`] = ` Cause: Invalid left-hand side expression in unary operation" `; +exports[`snippet: #4 format[yuku-ts] 1`] = ` +"Invalid operand for increment/decrement operator (1:3) +> 1 | --(1) + | ^^^" +`; + exports[`snippet: #5 format[babel-ts] 1`] = ` "Invalid left-hand side in postfix operation. (1:2) > 1 | (1 + 2)++ @@ -120,6 +150,12 @@ exports[`snippet: #5 format[typescript] 1`] = ` Cause: Invalid left-hand side expression in unary operation" `; +exports[`snippet: #5 format[yuku-ts] 1`] = ` +"Invalid operand for increment/decrement operator (1:1) +> 1 | (1 + 2)++ + | ^^^^^^^" +`; + exports[`snippet: #6 format[babel-ts] 1`] = ` "Invalid left-hand side in postfix operation. (1:2) > 1 | (1 + 2)-- @@ -140,6 +176,12 @@ exports[`snippet: #6 format[typescript] 1`] = ` Cause: Invalid left-hand side expression in unary operation" `; +exports[`snippet: #6 format[yuku-ts] 1`] = ` +"Invalid operand for increment/decrement operator (1:1) +> 1 | (1 + 2)-- + | ^^^^^^^" +`; + exports[`snippet: #7 format[babel-ts] 1`] = ` "Invalid left-hand side in prefix operation. (1:4) > 1 | ++(1 + 2) @@ -160,6 +202,12 @@ exports[`snippet: #7 format[typescript] 1`] = ` Cause: Invalid left-hand side expression in unary operation" `; +exports[`snippet: #7 format[yuku-ts] 1`] = ` +"Invalid operand for increment/decrement operator (1:3) +> 1 | ++(1 + 2) + | ^^^^^^^" +`; + exports[`snippet: #8 format[babel-ts] 1`] = ` "Invalid left-hand side in prefix operation. (1:4) > 1 | --(1 + 2) @@ -180,6 +228,12 @@ exports[`snippet: #8 format[typescript] 1`] = ` Cause: Invalid left-hand side expression in unary operation" `; +exports[`snippet: #8 format[yuku-ts] 1`] = ` +"Invalid operand for increment/decrement operator (1:3) +> 1 | --(1 + 2) + | ^^^^^^^" +`; + exports[`snippet: #9 format[babel-ts] 1`] = ` "Invalid left-hand side in postfix operation. (1:2) > 1 | (x + x)++ @@ -200,6 +254,12 @@ exports[`snippet: #9 format[typescript] 1`] = ` Cause: Invalid left-hand side expression in unary operation" `; +exports[`snippet: #9 format[yuku-ts] 1`] = ` +"Invalid operand for increment/decrement operator (1:1) +> 1 | (x + x)++ + | ^^^^^^^" +`; + exports[`snippet: #10 format[babel-ts] 1`] = ` "Invalid left-hand side in postfix operation. (1:2) > 1 | (x + x)-- @@ -220,6 +280,12 @@ exports[`snippet: #10 format[typescript] 1`] = ` Cause: Invalid left-hand side expression in unary operation" `; +exports[`snippet: #10 format[yuku-ts] 1`] = ` +"Invalid operand for increment/decrement operator (1:1) +> 1 | (x + x)-- + | ^^^^^^^" +`; + exports[`snippet: #11 format[babel-ts] 1`] = ` "Invalid left-hand side in prefix operation. (1:4) > 1 | ++(x + x) @@ -240,6 +306,12 @@ exports[`snippet: #11 format[typescript] 1`] = ` Cause: Invalid left-hand side expression in unary operation" `; +exports[`snippet: #11 format[yuku-ts] 1`] = ` +"Invalid operand for increment/decrement operator (1:3) +> 1 | ++(x + x) + | ^^^^^^^" +`; + exports[`snippet: #12 format[babel-ts] 1`] = ` "Invalid left-hand side in prefix operation. (1:4) > 1 | --(x + x) @@ -260,6 +332,12 @@ exports[`snippet: #12 format[typescript] 1`] = ` Cause: Invalid left-hand side expression in unary operation" `; +exports[`snippet: #12 format[yuku-ts] 1`] = ` +"Invalid operand for increment/decrement operator (1:3) +> 1 | --(x + x) + | ^^^^^^^" +`; + exports[`snippet: #13 format[babel-ts] 1`] = ` "Invalid left-hand side in postfix operation. (1:1) > 1 | a()++ @@ -280,6 +358,12 @@ exports[`snippet: #13 format[typescript] 1`] = ` Cause: Invalid left-hand side expression in unary operation" `; +exports[`snippet: #13 format[yuku-ts] 1`] = ` +"Invalid operand for increment/decrement operator (1:1) +> 1 | a()++ + | ^^^" +`; + exports[`snippet: #14 format[babel-ts] 1`] = ` "Invalid optional chaining in the left-hand side of postfix operation. (1:1) > 1 | x?.y++ @@ -300,6 +384,12 @@ exports[`snippet: #14 format[typescript] 1`] = ` Cause: Invalid left-hand side expression in unary operation" `; +exports[`snippet: #14 format[yuku-ts] 1`] = ` +"Invalid operand for increment/decrement operator (1:1) +> 1 | x?.y++ + | ^^^^" +`; + exports[`snippet: #15 format[babel-ts] 1`] = ` "Invalid optional chaining in the left-hand side of postfix operation. (1:1) > 1 | x?.y.z++ @@ -320,6 +410,12 @@ exports[`snippet: #15 format[typescript] 1`] = ` Cause: Invalid left-hand side expression in unary operation" `; +exports[`snippet: #15 format[yuku-ts] 1`] = ` +"Invalid operand for increment/decrement operator (1:1) +> 1 | x?.y.z++ + | ^^^^^^" +`; + exports[`snippet: #16 format[babel-ts] 1`] = ` "Invalid optional chaining in the left-hand side of postfix operation. (1:1) > 1 | x?.y().z++ @@ -340,6 +436,12 @@ exports[`snippet: #16 format[typescript] 1`] = ` Cause: Invalid left-hand side expression in unary operation" `; +exports[`snippet: #16 format[yuku-ts] 1`] = ` +"Invalid operand for increment/decrement operator (1:1) +> 1 | x?.y().z++ + | ^^^^^^^^" +`; + exports[`snippet: #17 format[babel-ts] 1`] = ` "Invalid left-hand side in postfix operation. (1:2) > 1 | (a())++ @@ -359,3 +461,9 @@ exports[`snippet: #17 format[typescript] 1`] = ` | ^^^^^ Cause: Invalid left-hand side expression in unary operation" `; + +exports[`snippet: #17 format[yuku-ts] 1`] = ` +"Invalid operand for increment/decrement operator (1:1) +> 1 | (a())++ + | ^^^^^" +`; diff --git a/tests/format/typescript/_errors_/decrement-and-increment-operators/format.test.js b/tests/format/typescript/_errors_/decrement-and-increment-operators/format.test.js index 32f3d4c8d..2aef74df6 100644 --- a/tests/format/typescript/_errors_/decrement-and-increment-operators/format.test.js +++ b/tests/format/typescript/_errors_/decrement-and-increment-operators/format.test.js @@ -29,5 +29,5 @@ runFormatTest( "(a())++", ], }, - ["typescript", "babel-ts", "oxc-ts"], + ["typescript", "babel-ts", "oxc-ts", "yuku-ts"], ); diff --git a/tests/format/typescript/_errors_/duplicated-accessibility-modifiers/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/duplicated-accessibility-modifiers/__snapshots__/format.test.js.snap index de483011a..71882ee71 100644 --- a/tests/format/typescript/_errors_/duplicated-accessibility-modifiers/__snapshots__/format.test.js.snap +++ b/tests/format/typescript/_errors_/duplicated-accessibility-modifiers/__snapshots__/format.test.js.snap @@ -20,6 +20,12 @@ exports[`snippet: #0 format[typescript] 1`] = ` Cause: Accessibility modifier already seen." `; +exports[`snippet: #0 format[yuku-ts] 1`] = ` +"Expected ';' after class field, but found 'method' (1:28) +> 1 | class A {private protected method(){}} + | ^^^^^^" +`; + exports[`snippet: #1 format[babel-ts] 1`] = ` "Accessibility modifier already seen: 'public'. (1:20) > 1 | class A {protected public method(){}} @@ -40,6 +46,12 @@ exports[`snippet: #1 format[typescript] 1`] = ` Cause: Accessibility modifier already seen." `; +exports[`snippet: #1 format[yuku-ts] 1`] = ` +"Expected ';' after class field, but found 'method' (1:27) +> 1 | class A {protected public method(){}} + | ^^^^^^" +`; + exports[`snippet: #2 format[babel-ts] 1`] = ` "Accessibility modifier already seen: 'private'. (1:18) > 1 | class A {private private method(){}} @@ -60,6 +72,12 @@ exports[`snippet: #2 format[typescript] 1`] = ` Cause: Accessibility modifier already seen." `; +exports[`snippet: #2 format[yuku-ts] 1`] = ` +"Expected ';' after class field, but found 'method' (1:26) +> 1 | class A {private private method(){}} + | ^^^^^^" +`; + exports[`snippet: #3 format[babel-ts] 1`] = ` "Accessibility modifier already seen: 'protected'. (1:18) > 1 | class A {private protected property} @@ -80,6 +98,12 @@ exports[`snippet: #3 format[typescript] 1`] = ` Cause: Accessibility modifier already seen." `; +exports[`snippet: #3 format[yuku-ts] 1`] = ` +"Expected ';' after class field, but found 'property' (1:28) +> 1 | class A {private protected property} + | ^^^^^^^^" +`; + exports[`snippet: #4 format[babel-ts] 1`] = ` "Accessibility modifier already seen: 'public'. (1:20) > 1 | class A {protected public property} @@ -100,6 +124,12 @@ exports[`snippet: #4 format[typescript] 1`] = ` Cause: Accessibility modifier already seen." `; +exports[`snippet: #4 format[yuku-ts] 1`] = ` +"Expected ';' after class field, but found 'property' (1:27) +> 1 | class A {protected public property} + | ^^^^^^^^" +`; + exports[`snippet: #5 format[babel-ts] 1`] = ` "Accessibility modifier already seen: 'private'. (1:18) > 1 | class A {private private property} @@ -119,3 +149,9 @@ exports[`snippet: #5 format[typescript] 1`] = ` | ^^^^^^^ Cause: Accessibility modifier already seen." `; + +exports[`snippet: #5 format[yuku-ts] 1`] = ` +"Expected ';' after class field, but found 'property' (1:26) +> 1 | class A {private private property} + | ^^^^^^^^" +`; diff --git a/tests/format/typescript/_errors_/duplicated-accessibility-modifiers/format.test.js b/tests/format/typescript/_errors_/duplicated-accessibility-modifiers/format.test.js index ac69bf7bc..10040742b 100644 --- a/tests/format/typescript/_errors_/duplicated-accessibility-modifiers/format.test.js +++ b/tests/format/typescript/_errors_/duplicated-accessibility-modifiers/format.test.js @@ -10,5 +10,5 @@ runFormatTest( "class A {private private property}", ], }, - ["typescript", "babel-ts", "oxc-ts"], + ["typescript", "babel-ts", "oxc-ts", "yuku-ts"], ); diff --git a/tests/format/typescript/_errors_/empty-type-arguments-parameters/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/empty-type-arguments-parameters/__snapshots__/format.test.js.snap index d50c06f3a..b9c3578b5 100644 --- a/tests/format/typescript/_errors_/empty-type-arguments-parameters/__snapshots__/format.test.js.snap +++ b/tests/format/typescript/_errors_/empty-type-arguments-parameters/__snapshots__/format.test.js.snap @@ -20,6 +20,12 @@ exports[`snippet: #0 format[typescript] 1`] = ` Cause: Type argument list cannot be empty." `; +exports[`snippet: #0 format[yuku-ts] 1`] = ` +"A type argument list cannot be empty (1:5) +> 1 | foo<>() + | ^" +`; + exports[`snippet: #1 format[babel-ts] 1`] = ` "Type argument list cannot be empty. (1:5) > 1 | (foo<>()) @@ -40,6 +46,12 @@ exports[`snippet: #1 format[typescript] 1`] = ` Cause: Type argument list cannot be empty." `; +exports[`snippet: #1 format[yuku-ts] 1`] = ` +"A type argument list cannot be empty (1:6) +> 1 | (foo<>()) + | ^" +`; + exports[`snippet: #2 format[babel-ts] 1`] = ` "Type argument list cannot be empty. (1:8) > 1 | new Foo<>() @@ -60,6 +72,12 @@ exports[`snippet: #2 format[typescript] 1`] = ` Cause: Type argument list cannot be empty." `; +exports[`snippet: #2 format[yuku-ts] 1`] = ` +"A type argument list cannot be empty (1:9) +> 1 | new Foo<>() + | ^" +`; + exports[`snippet: #3 format[babel-ts] 1`] = ` "Type parameter list cannot be empty. (1:13) > 1 | function foo<>(){} @@ -80,6 +98,12 @@ exports[`snippet: #3 format[typescript] 1`] = ` Cause: Type parameter list cannot be empty." `; +exports[`snippet: #3 format[yuku-ts] 1`] = ` +"A type parameter list cannot be empty (1:14) +> 1 | function foo<>(){} + | ^" +`; + exports[`snippet: #4 format[babel-ts] 1`] = ` "Type parameter list cannot be empty. (1:14) > 1 | (function foo<>(){}) @@ -100,6 +124,12 @@ exports[`snippet: #4 format[typescript] 1`] = ` Cause: Type parameter list cannot be empty." `; +exports[`snippet: #4 format[yuku-ts] 1`] = ` +"A type parameter list cannot be empty (1:15) +> 1 | (function foo<>(){}) + | ^" +`; + exports[`snippet: #5 format[babel-ts] 1`] = ` "Type parameter list cannot be empty. (1:10) > 1 | class Foo<> {} @@ -120,6 +150,12 @@ exports[`snippet: #5 format[typescript] 1`] = ` Cause: Type parameter list cannot be empty." `; +exports[`snippet: #5 format[yuku-ts] 1`] = ` +"A type parameter list cannot be empty (1:11) +> 1 | class Foo<> {} + | ^" +`; + exports[`snippet: #6 format[babel-ts] 1`] = ` "Type parameter list cannot be empty. (1:11) > 1 | (class Foo<> {}) @@ -140,6 +176,12 @@ exports[`snippet: #6 format[typescript] 1`] = ` Cause: Type parameter list cannot be empty." `; +exports[`snippet: #6 format[yuku-ts] 1`] = ` +"A type parameter list cannot be empty (1:12) +> 1 | (class Foo<> {}) + | ^" +`; + exports[`snippet: #7 format[babel-ts] 1`] = ` "Type parameter list cannot be empty. (1:23) > 1 | class Foo {constructor<>()} @@ -160,6 +202,12 @@ exports[`snippet: #7 format[typescript] 1`] = ` Cause: Type parameter list cannot be empty." `; +exports[`snippet: #7 format[yuku-ts] 1`] = ` +"A type parameter list cannot be empty (1:24) +> 1 | class Foo {constructor<>()} + | ^" +`; + exports[`snippet: #8 format[babel-ts] 1`] = ` "Type parameter list cannot be empty. (1:24) > 1 | (class Foo {constructor<>()}) @@ -180,6 +228,12 @@ exports[`snippet: #8 format[typescript] 1`] = ` Cause: Type parameter list cannot be empty." `; +exports[`snippet: #8 format[yuku-ts] 1`] = ` +"A type parameter list cannot be empty (1:25) +> 1 | (class Foo {constructor<>()}) + | ^" +`; + exports[`snippet: #9 format[babel-ts] 1`] = ` "Type parameter list cannot be empty. (1:18) > 1 | class Foo {method<>()} @@ -200,6 +254,12 @@ exports[`snippet: #9 format[typescript] 1`] = ` Cause: Type parameter list cannot be empty." `; +exports[`snippet: #9 format[yuku-ts] 1`] = ` +"A type parameter list cannot be empty (1:19) +> 1 | class Foo {method<>()} + | ^" +`; + exports[`snippet: #10 format[babel-ts] 1`] = ` "Type parameter list cannot be empty. (1:19) > 1 | (class Foo {method<>()}) @@ -220,6 +280,12 @@ exports[`snippet: #10 format[typescript] 1`] = ` Cause: Type parameter list cannot be empty." `; +exports[`snippet: #10 format[yuku-ts] 1`] = ` +"A type parameter list cannot be empty (1:20) +> 1 | (class Foo {method<>()}) + | ^" +`; + exports[`snippet: #11 format[babel-ts] 1`] = ` "Type parameter list cannot be empty. (1:22) > 1 | class Foo {get getter<>()} @@ -240,6 +306,12 @@ exports[`snippet: #11 format[typescript] 1`] = ` Cause: Type parameter list cannot be empty." `; +exports[`snippet: #11 format[yuku-ts] 1`] = ` +"A type parameter list cannot be empty (1:23) +> 1 | class Foo {get getter<>()} + | ^" +`; + exports[`snippet: #12 format[babel-ts] 1`] = ` "Type parameter list cannot be empty. (1:23) > 1 | (class Foo {get getter<>()}) @@ -260,6 +332,12 @@ exports[`snippet: #12 format[typescript] 1`] = ` Cause: Type parameter list cannot be empty." `; +exports[`snippet: #12 format[yuku-ts] 1`] = ` +"A type parameter list cannot be empty (1:24) +> 1 | (class Foo {get getter<>()}) + | ^" +`; + exports[`snippet: #13 format[babel-ts] 1`] = ` "Type argument list cannot be empty. (1:25) > 1 | class Foo {property: Bar<> = 1} @@ -280,6 +358,12 @@ exports[`snippet: #13 format[typescript] 1`] = ` Cause: Type argument list cannot be empty." `; +exports[`snippet: #13 format[yuku-ts] 1`] = ` +"A type argument list cannot be empty (1:26) +> 1 | class Foo {property: Bar<> = 1} + | ^" +`; + exports[`snippet: #14 format[babel-ts] 1`] = ` "Type argument list cannot be empty. (1:26) > 1 | (class Foo {property: Bar<> = 1}) @@ -300,6 +384,12 @@ exports[`snippet: #14 format[typescript] 1`] = ` Cause: Type argument list cannot be empty." `; +exports[`snippet: #14 format[yuku-ts] 1`] = ` +"A type argument list cannot be empty (1:27) +> 1 | (class Foo {property: Bar<> = 1}) + | ^" +`; + exports[`snippet: #15 format[babel-ts] 1`] = ` "Type parameter list cannot be empty. (1:14) > 1 | interface Foo<> {} @@ -320,6 +410,12 @@ exports[`snippet: #15 format[typescript] 1`] = ` Cause: Type parameter list cannot be empty." `; +exports[`snippet: #15 format[yuku-ts] 1`] = ` +"A type parameter list cannot be empty (1:15) +> 1 | interface Foo<> {} + | ^" +`; + exports[`snippet: #16 format[babel-ts] 1`] = ` "Type parameter list cannot be empty. (1:19) > 1 | interface Foo {bar<>()} @@ -340,6 +436,12 @@ exports[`snippet: #16 format[typescript] 1`] = ` Cause: Type parameter list cannot be empty." `; +exports[`snippet: #16 format[yuku-ts] 1`] = ` +"A type parameter list cannot be empty (1:20) +> 1 | interface Foo {bar<>()} + | ^" +`; + exports[`snippet: #17 format[babel-ts] 1`] = ` "Type parameter list cannot be empty. (1:16) > 1 | interface Foo {<>(): boolean} @@ -360,6 +462,12 @@ exports[`snippet: #17 format[typescript] 1`] = ` Cause: Type parameter list cannot be empty." `; +exports[`snippet: #17 format[yuku-ts] 1`] = ` +"A type parameter list cannot be empty (1:17) +> 1 | interface Foo {<>(): boolean} + | ^" +`; + exports[`snippet: #18 format[babel-ts] 1`] = ` "Type argument list cannot be empty. (1:15) > 1 | const foo: Foo<> = 1 @@ -380,6 +488,12 @@ exports[`snippet: #18 format[typescript] 1`] = ` Cause: Type argument list cannot be empty." `; +exports[`snippet: #18 format[yuku-ts] 1`] = ` +"A type argument list cannot be empty (1:16) +> 1 | const foo: Foo<> = 1 + | ^" +`; + exports[`snippet: #19 format[babel-ts] 1`] = ` "Type parameter list cannot be empty. (1:12) > 1 | type Foo = <>() => {} @@ -399,3 +513,9 @@ exports[`snippet: #19 format[typescript] 1`] = ` | ^^ Cause: Type parameter list cannot be empty." `; + +exports[`snippet: #19 format[yuku-ts] 1`] = ` +"A type parameter list cannot be empty (1:13) +> 1 | type Foo = <>() => {} + | ^" +`; diff --git a/tests/format/typescript/_errors_/empty-type-arguments-parameters/format.test.js b/tests/format/typescript/_errors_/empty-type-arguments-parameters/format.test.js index 6ca456f67..cf75138ee 100644 --- a/tests/format/typescript/_errors_/empty-type-arguments-parameters/format.test.js +++ b/tests/format/typescript/_errors_/empty-type-arguments-parameters/format.test.js @@ -24,5 +24,5 @@ runFormatTest( "type Foo = <>() => {}", ], }, - ["typescript", "babel-ts", "oxc-ts"], + ["typescript", "babel-ts", "oxc-ts", "yuku-ts"], ); diff --git a/tests/format/typescript/_errors_/enum/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/enum/__snapshots__/format.test.js.snap index 85318319a..293d7e97f 100644 --- a/tests/format/typescript/_errors_/enum/__snapshots__/format.test.js.snap +++ b/tests/format/typescript/_errors_/enum/__snapshots__/format.test.js.snap @@ -44,6 +44,22 @@ exports[`snippet: #0 format[typescript] 2`] = ` Cause: Computed property names are not allowed in enums." `; +exports[`snippet: #0 format[yuku-ts] 1`] = ` +"Unexpected token '1' as enum member name (2:3) + 1 | enum Foo { +> 2 | 1 = 1 + | ^ + 3 | }" +`; + +exports[`snippet: #0 format[yuku-ts] 2`] = ` +"Computed property names are not allowed in enums (2:3) + 1 | enum Foo { +> 2 | ['foo'] = 1 + | ^^^^^^^ + 3 | }" +`; + exports[`snippet: #1 format[babel-ts] 1`] = ` "Unexpected token (2:3) 1 | enum Foo { @@ -70,6 +86,14 @@ exports[`snippet: #1 format[typescript] 1`] = ` Cause: An enum member cannot have a numeric name." `; +exports[`snippet: #1 format[yuku-ts] 1`] = ` +"Unexpected token '1n' as enum member name (2:3) + 1 | enum Foo { +> 2 | 1n = 1 + | ^^ + 3 | }" +`; + exports[`snippet: #2 format[babel-ts] 1`] = ` "Unexpected token (2:3) 1 | enum Foo { @@ -96,6 +120,14 @@ exports[`snippet: #2 format[typescript] 1`] = ` Cause: Computed property names are not allowed in enums." `; +exports[`snippet: #2 format[yuku-ts] 1`] = ` +"Computed property names are not allowed in enums (2:3) + 1 | enum Foo { +> 2 | [1] = 1 + | ^^^ + 3 | }" +`; + exports[`snippet: #3 format[babel-ts] 1`] = ` "Unexpected token (2:3) 1 | enum Foo { @@ -122,6 +154,14 @@ exports[`snippet: #3 format[typescript] 1`] = ` Cause: Computed property names are not allowed in enums." `; +exports[`snippet: #3 format[yuku-ts] 1`] = ` +"Computed property names are not allowed in enums (2:3) + 1 | enum Foo { +> 2 | [1n] = 1 + | ^^^^ + 3 | }" +`; + exports[`snippet: #4 format[babel-ts] 1`] = ` "Unexpected token (2:3) 1 | enum Foo { @@ -147,3 +187,11 @@ exports[`snippet: #4 format[typescript] 1`] = ` 3 | } Cause: Computed property names are not allowed in enums." `; + +exports[`snippet: #4 format[yuku-ts] 1`] = ` +"Computed property names are not allowed in enums (2:3) + 1 | enum Foo { +> 2 | [foo] = 1 + | ^^^^^ + 3 | }" +`; diff --git a/tests/format/typescript/_errors_/enum/format.test.js b/tests/format/typescript/_errors_/enum/format.test.js index 5088bd10b..42ba7b8c9 100644 --- a/tests/format/typescript/_errors_/enum/format.test.js +++ b/tests/format/typescript/_errors_/enum/format.test.js @@ -11,7 +11,7 @@ runFormatTest( `, ), }, - ["typescript", "babel-ts", "oxc-ts"], + ["typescript", "babel-ts", "oxc-ts", "yuku-ts"], ); runFormatTest( @@ -32,5 +32,6 @@ runFormatTest( // https://github.com/microsoft/TypeScript/issues/61834 // https://github.com/microsoft/TypeScript/issues/42468 // "oxc-ts", + "yuku-ts", ], ); diff --git a/tests/format/typescript/_errors_/export-declare/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/export-declare/__snapshots__/format.test.js.snap index 5917b909c..ce40d7409 100644 --- a/tests/format/typescript/_errors_/export-declare/__snapshots__/format.test.js.snap +++ b/tests/format/typescript/_errors_/export-declare/__snapshots__/format.test.js.snap @@ -22,3 +22,10 @@ exports[`export-declare.ts format[typescript] 1`] = ` 2 | Cause: Declaration or statement expected." `; + +exports[`export-declare.ts format[yuku-ts] 1`] = ` +"Expected declaration after 'export', but found 'declare' (1:8) +> 1 | export declare foo; + | ^^^^^^^ + 2 |" +`; diff --git a/tests/format/typescript/_errors_/export-declare/format.test.js b/tests/format/typescript/_errors_/export-declare/format.test.js index 1831abd0d..f78aea343 100644 --- a/tests/format/typescript/_errors_/export-declare/format.test.js +++ b/tests/format/typescript/_errors_/export-declare/format.test.js @@ -1 +1 @@ -runFormatTest(import.meta, ["typescript", "babel-ts", "oxc-ts"]); +runFormatTest(import.meta, ["typescript", "babel-ts", "oxc-ts", "yuku-ts"]); diff --git a/tests/format/typescript/_errors_/import-attributes/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/import-attributes/__snapshots__/format.test.js.snap index b18e16ba6..e8a8742b2 100644 --- a/tests/format/typescript/_errors_/import-attributes/__snapshots__/format.test.js.snap +++ b/tests/format/typescript/_errors_/import-attributes/__snapshots__/format.test.js.snap @@ -22,3 +22,10 @@ exports[`module-attributes-static.ts format[typescript] 1`] = ` 2 | Cause: '{' expected." `; + +exports[`module-attributes-static.ts format[yuku-ts] 1`] = ` +"Expected '{' after 'with' in import attributes, but found 'type' (1:33) +> 1 | import foo from "foo.json" with type: "json"; + | ^^^^ + 2 |" +`; diff --git a/tests/format/typescript/_errors_/import-attributes/format.test.js b/tests/format/typescript/_errors_/import-attributes/format.test.js index 1831abd0d..f78aea343 100644 --- a/tests/format/typescript/_errors_/import-attributes/format.test.js +++ b/tests/format/typescript/_errors_/import-attributes/format.test.js @@ -1 +1 @@ -runFormatTest(import.meta, ["typescript", "babel-ts", "oxc-ts"]); +runFormatTest(import.meta, ["typescript", "babel-ts", "oxc-ts", "yuku-ts"]); diff --git a/tests/format/typescript/_errors_/import-reflection/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/import-reflection/__snapshots__/format.test.js.snap index 540ddd222..9e8a801cb 100644 --- a/tests/format/typescript/_errors_/import-reflection/__snapshots__/format.test.js.snap +++ b/tests/format/typescript/_errors_/import-reflection/__snapshots__/format.test.js.snap @@ -26,6 +26,14 @@ exports[`valid-flow-default-import.mts format[typescript] 1`] = ` Cause: '=' expected." `; +exports[`valid-flow-default-import.mts format[yuku-ts] 1`] = ` +"Expected 'from' after import clause, but found 'foo' (1:15) +> 1 | import module foo from "./module.wasm"; + | ^^^ + 2 | import bar from "./module.wasm"; + 3 |" +`; + exports[`valid-ts-default-import.mts format[babel-ts] 1`] = ` "Unexpected token, expected "from" (1:15) > 1 | import module foo from "./module.wasm"; @@ -51,3 +59,11 @@ exports[`valid-ts-default-import.mts format[typescript] 1`] = ` 3 | Cause: '=' expected." `; + +exports[`valid-ts-default-import.mts format[yuku-ts] 1`] = ` +"Expected 'from' after import clause, but found 'foo' (1:15) +> 1 | import module foo from "./module.wasm"; + | ^^^ + 2 | import bar from "./module.wasm"; + 3 |" +`; diff --git a/tests/format/typescript/_errors_/import-reflection/format.test.js b/tests/format/typescript/_errors_/import-reflection/format.test.js index 1831abd0d..f78aea343 100644 --- a/tests/format/typescript/_errors_/import-reflection/format.test.js +++ b/tests/format/typescript/_errors_/import-reflection/format.test.js @@ -1 +1 @@ -runFormatTest(import.meta, ["typescript", "babel-ts", "oxc-ts"]); +runFormatTest(import.meta, ["typescript", "babel-ts", "oxc-ts", "yuku-ts"]); diff --git a/tests/format/typescript/_errors_/interface/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/interface/__snapshots__/format.test.js.snap index 0adea99ba..e6eb9dad9 100644 --- a/tests/format/typescript/_errors_/interface/__snapshots__/format.test.js.snap +++ b/tests/format/typescript/_errors_/interface/__snapshots__/format.test.js.snap @@ -20,6 +20,12 @@ exports[`snippet: #0 format[typescript] 1`] = ` Cause: A property signature cannot have an initializer." `; +exports[`snippet: #0 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found '=' (1:25) +> 1 | interface I { x: number = 1;} + | ^" +`; + exports[`snippet: #1 format[babel-ts] 1`] = ` "Unexpected token, expected "{" (1:13) > 1 | interface A mixins B {} @@ -40,6 +46,12 @@ exports[`snippet: #1 format[typescript] 1`] = ` Cause: '{' expected." `; +exports[`snippet: #1 format[yuku-ts] 1`] = ` +"Expected '{' to start an interface body, but found 'mixins' (1:13) +> 1 | interface A mixins B {} + | ^^^^^^" +`; + exports[`snippet: #2 format[babel-ts] 1`] = ` "Unexpected token, expected "{" (1:13) > 1 | interface A implements B {} @@ -59,3 +71,9 @@ exports[`snippet: #2 format[typescript] 1`] = ` | ^^^^^^^^^^^^ Cause: Interface declaration cannot have 'implements' clause." `; + +exports[`snippet: #2 format[yuku-ts] 1`] = ` +"Expected '{' to start an interface body, but found 'implements' (1:13) +> 1 | interface A implements B {} + | ^^^^^^^^^^" +`; diff --git a/tests/format/typescript/_errors_/interface/format.test.js b/tests/format/typescript/_errors_/interface/format.test.js index dc94f9e78..28a16bf6e 100644 --- a/tests/format/typescript/_errors_/interface/format.test.js +++ b/tests/format/typescript/_errors_/interface/format.test.js @@ -9,5 +9,5 @@ runFormatTest( "interface A implements B {}", ], }, - ["typescript", "babel-ts", "oxc-ts"], + ["typescript", "babel-ts", "oxc-ts", "yuku-ts"], ); diff --git a/tests/format/typescript/_errors_/invalid-class-implements/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/invalid-class-implements/__snapshots__/format.test.js.snap index 23e0d0b6b..4ae2b70f1 100644 --- a/tests/format/typescript/_errors_/invalid-class-implements/__snapshots__/format.test.js.snap +++ b/tests/format/typescript/_errors_/invalid-class-implements/__snapshots__/format.test.js.snap @@ -20,6 +20,12 @@ exports[`snippet: #0 format[typescript] 1`] = ` Cause: A class can only implement an identifier/qualified-name with optional type arguments." `; +exports[`snippet: #0 format[yuku-ts] 1`] = ` +"Expected '{' to start class body, but found '?.' (1:23) +> 1 | class Foo implements A?.B {} + | ^^" +`; + exports[`snippet: #1 format[babel-ts] 1`] = ` "'implements' list can only include identifiers or qualified-names with optional type arguments. (1:23) > 1 | (class Foo implements A?.B {}) @@ -40,6 +46,12 @@ exports[`snippet: #1 format[typescript] 1`] = ` Cause: A class can only implement an identifier/qualified-name with optional type arguments." `; +exports[`snippet: #1 format[yuku-ts] 1`] = ` +"Expected '{' to start class body, but found '?.' (1:24) +> 1 | (class Foo implements A?.B {}) + | ^^" +`; + exports[`snippet: #2 format[babel-ts] 1`] = ` "'implements' list can only include identifiers or qualified-names with optional type arguments. (1:22) > 1 | class Foo implements "thing" {} @@ -60,6 +72,12 @@ exports[`snippet: #2 format[typescript] 1`] = ` Cause: A class can only implement an identifier/qualified-name with optional type arguments." `; +exports[`snippet: #2 format[yuku-ts] 1`] = ` +"Expected an identifier, but found '"thing"' (1:22) +> 1 | class Foo implements "thing" {} + | ^^^^^^^" +`; + exports[`snippet: #3 format[babel-ts] 1`] = ` "'implements' list can only include identifiers or qualified-names with optional type arguments. (1:23) > 1 | (class Foo implements "thing" {}) @@ -79,3 +97,9 @@ exports[`snippet: #3 format[typescript] 1`] = ` | ^^^^^^^ Cause: A class can only implement an identifier/qualified-name with optional type arguments." `; + +exports[`snippet: #3 format[yuku-ts] 1`] = ` +"Expected an identifier, but found '"thing"' (1:23) +> 1 | (class Foo implements "thing" {}) + | ^^^^^^^" +`; diff --git a/tests/format/typescript/_errors_/invalid-class-implements/format.test.js b/tests/format/typescript/_errors_/invalid-class-implements/format.test.js index 69d4b2267..58fbed928 100644 --- a/tests/format/typescript/_errors_/invalid-class-implements/format.test.js +++ b/tests/format/typescript/_errors_/invalid-class-implements/format.test.js @@ -6,5 +6,5 @@ runFormatTest( 'class Foo implements "thing" {}', ].flatMap((code) => [code, `(${code})`]), }, - ["typescript", "babel-ts", "oxc-ts"], + ["typescript", "babel-ts", "oxc-ts", "yuku-ts"], ); diff --git a/tests/format/typescript/_errors_/invalid-define/format.test.js b/tests/format/typescript/_errors_/invalid-define/format.test.js deleted file mode 100644 index 612f188fd..000000000 --- a/tests/format/typescript/_errors_/invalid-define/format.test.js +++ /dev/null @@ -1,27 +0,0 @@ -runFormatTest( - { - importMeta: import.meta, - snippets: [ - "let x!", - "let x! = 1", - "class C {x!}", - "class C {x! = 1}", - // "class C {accessor x!}", - // "class C {accessor x! = 1}", - ], - }, - ["typescript", "babel-ts", "oxc-ts"], -); - -runFormatTest( - { - importMeta: import.meta, - snippets: ["class C {accessor x!}", "class C {accessor x! = 1}"], - }, - [ - "typescript", - "babel-ts", - // https://github.com/oxc-project/oxc/issues/24503 - // "oxc-ts", - ], -); diff --git a/tests/format/typescript/_errors_/invalid-define/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/invalid-definite/__snapshots__/format.test.js.snap similarity index 69% rename from tests/format/typescript/_errors_/invalid-define/__snapshots__/format.test.js.snap rename to tests/format/typescript/_errors_/invalid-definite/__snapshots__/format.test.js.snap index b12f8ff53..3b51acf18 100644 --- a/tests/format/typescript/_errors_/invalid-define/__snapshots__/format.test.js.snap +++ b/tests/format/typescript/_errors_/invalid-definite/__snapshots__/format.test.js.snap @@ -7,13 +7,6 @@ exports[`snippet: #0 format[babel-ts] 1`] = ` Cause: Declarations with definite assignment assertions must also have type annotations. (1:4)" `; -exports[`snippet: #0 format[babel-ts] 2`] = ` -"Declarations with definite assignment assertions must also have type annotations. (1:10) -> 1 | class C {accessor x!} - | ^ -Cause: Declarations with definite assignment assertions must also have type annotations. (1:9)" -`; - exports[`snippet: #0 format[oxc-ts] 1`] = ` "Declarations with definite assignment assertions must also have type annotations. (1:6) > 1 | let x! @@ -27,11 +20,10 @@ exports[`snippet: #0 format[typescript] 1`] = ` Cause: Declarations with definite assignment assertions must also have type annotations." `; -exports[`snippet: #0 format[typescript] 2`] = ` -"Declarations with definite assignment assertions must also have type annotations. (1:10) -> 1 | class C {accessor x!} - | ^^^^^^^^^^^ -Cause: Declarations with definite assignment assertions must also have type annotations." +exports[`snippet: #0 format[yuku-ts] 1`] = ` +"A declaration with a definite assignment assertion must also have a type annotation (1:5) +> 1 | let x! + | ^" `; exports[`snippet: #1 format[babel-ts] 1`] = ` @@ -41,13 +33,6 @@ exports[`snippet: #1 format[babel-ts] 1`] = ` Cause: Declarations with initializers cannot also have definite assignment assertions. (1:4)" `; -exports[`snippet: #1 format[babel-ts] 2`] = ` -"Declarations with initializers cannot also have definite assignment assertions. (1:10) -> 1 | class C {accessor x! = 1} - | ^ -Cause: Declarations with initializers cannot also have definite assignment assertions. (1:9)" -`; - exports[`snippet: #1 format[oxc-ts] 1`] = ` "Declarations with initializers cannot also have definite assignment assertions. (1:6) > 1 | let x! = 1 @@ -61,11 +46,10 @@ exports[`snippet: #1 format[typescript] 1`] = ` Cause: Declarations with initializers cannot also have definite assignment assertions." `; -exports[`snippet: #1 format[typescript] 2`] = ` -"Declarations with definite assignment assertions must also have type annotations. (1:10) -> 1 | class C {accessor x! = 1} - | ^^^^^^^^^^^^^^^ -Cause: Declarations with definite assignment assertions must also have type annotations." +exports[`snippet: #1 format[yuku-ts] 1`] = ` +"A declaration with an initializer cannot also have a definite assignment assertion (1:5) +> 1 | let x! = 1 + | ^" `; exports[`snippet: #2 format[babel-ts] 1`] = ` @@ -88,6 +72,12 @@ exports[`snippet: #2 format[typescript] 1`] = ` Cause: Declarations with definite assignment assertions must also have type annotations." `; +exports[`snippet: #2 format[yuku-ts] 1`] = ` +"A declaration with a definite assignment assertion must also have a type annotation (1:10) +> 1 | class C {x!} + | ^" +`; + exports[`snippet: #3 format[babel-ts] 1`] = ` "Declarations with initializers cannot also have definite assignment assertions. (1:10) > 1 | class C {x! = 1} @@ -107,3 +97,61 @@ exports[`snippet: #3 format[typescript] 1`] = ` | ^^^^^^ Cause: Declarations with definite assignment assertions must also have type annotations." `; + +exports[`snippet: #3 format[yuku-ts] 1`] = ` +"A declaration with an initializer cannot also have a definite assignment assertion (1:10) +> 1 | class C {x! = 1} + | ^" +`; + +exports[`snippet: #4 format[babel-ts] 1`] = ` +"Declarations with definite assignment assertions must also have type annotations. (1:10) +> 1 | class C {accessor x!} + | ^ +Cause: Declarations with definite assignment assertions must also have type annotations. (1:9)" +`; + +exports[`snippet: #4 format[oxc-ts] 1`] = ` +"Declarations with definite assignment assertions must also have type annotations. (1:20) +> 1 | class C {accessor x!} + | ^" +`; + +exports[`snippet: #4 format[typescript] 1`] = ` +"Declarations with definite assignment assertions must also have type annotations. (1:10) +> 1 | class C {accessor x!} + | ^^^^^^^^^^^ +Cause: Declarations with definite assignment assertions must also have type annotations." +`; + +exports[`snippet: #4 format[yuku-ts] 1`] = ` +"A declaration with a definite assignment assertion must also have a type annotation (1:19) +> 1 | class C {accessor x!} + | ^" +`; + +exports[`snippet: #5 format[babel-ts] 1`] = ` +"Declarations with initializers cannot also have definite assignment assertions. (1:10) +> 1 | class C {accessor x! = 1} + | ^ +Cause: Declarations with initializers cannot also have definite assignment assertions. (1:9)" +`; + +exports[`snippet: #5 format[oxc-ts] 1`] = ` +"Declarations with initializers cannot also have definite assignment assertions. (1:20) +> 1 | class C {accessor x! = 1} + | ^" +`; + +exports[`snippet: #5 format[typescript] 1`] = ` +"Declarations with definite assignment assertions must also have type annotations. (1:10) +> 1 | class C {accessor x! = 1} + | ^^^^^^^^^^^^^^^ +Cause: Declarations with definite assignment assertions must also have type annotations." +`; + +exports[`snippet: #5 format[yuku-ts] 1`] = ` +"A declaration with an initializer cannot also have a definite assignment assertion (1:19) +> 1 | class C {accessor x! = 1} + | ^" +`; diff --git a/tests/format/typescript/_errors_/invalid-definite/format.test.js b/tests/format/typescript/_errors_/invalid-definite/format.test.js new file mode 100644 index 000000000..8ffb30909 --- /dev/null +++ b/tests/format/typescript/_errors_/invalid-definite/format.test.js @@ -0,0 +1,14 @@ +runFormatTest( + { + importMeta: import.meta, + snippets: [ + "let x!", + "let x! = 1", + "class C {x!}", + "class C {x! = 1}", + "class C {accessor x!}", + "class C {accessor x! = 1}", + ], + }, + ["typescript", "babel-ts", "oxc-ts", "yuku-ts"], +); diff --git a/tests/format/typescript/_errors_/invalid-import-equals/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/invalid-import-equals/__snapshots__/format.test.js.snap index 5a6503678..f97a5f421 100644 --- a/tests/format/typescript/_errors_/invalid-import-equals/__snapshots__/format.test.js.snap +++ b/tests/format/typescript/_errors_/invalid-import-equals/__snapshots__/format.test.js.snap @@ -7,9 +7,21 @@ exports[`snippet: #0 format[babel-ts] 1`] = ` Cause: An import alias can not use 'import type'. (1:16)" `; +exports[`snippet: #0 format[oxc-ts] 1`] = ` +"An import alias cannot use 'import type' (1:1) +> 1 | import type F = T; + | ^^^^^^^^^^^^^^^^^^" +`; + exports[`snippet: #0 format[typescript] 1`] = ` "An import alias cannot use 'import type' (1:1) > 1 | import type F = T; | ^^^^^^^^^^^^^^^^^^ Cause: An import alias cannot use 'import type'" `; + +exports[`snippet: #0 format[yuku-ts] 1`] = ` +"An import alias cannot use 'import type' (1:1) +> 1 | import type F = T; + | ^^^^^^^^^^^^^^^^^" +`; diff --git a/tests/format/typescript/_errors_/invalid-import-equals/format.test.js b/tests/format/typescript/_errors_/invalid-import-equals/format.test.js index 5afa28e12..a2e8ceaf8 100644 --- a/tests/format/typescript/_errors_/invalid-import-equals/format.test.js +++ b/tests/format/typescript/_errors_/invalid-import-equals/format.test.js @@ -3,10 +3,5 @@ runFormatTest( importMeta: import.meta, snippets: ["import type F = T;"], }, - [ - "typescript", - "babel-ts", - // Didn't reject - // "oxc-ts" - ], + ["typescript", "babel-ts", "oxc-ts", "yuku-ts"], ); diff --git a/tests/format/typescript/_errors_/invalid-interface-extends/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/invalid-interface-extends/__snapshots__/format.test.js.snap index b27f7fb42..8cc8d0f24 100644 --- a/tests/format/typescript/_errors_/invalid-interface-extends/__snapshots__/format.test.js.snap +++ b/tests/format/typescript/_errors_/invalid-interface-extends/__snapshots__/format.test.js.snap @@ -7,6 +7,12 @@ exports[`snippet: #0 format[babel-ts] 1`] = ` Cause: 'extends' list can only include identifiers or qualified-names with optional type arguments. (1:20)" `; +exports[`snippet: #0 format[oxc-ts] 1`] = ` +"An interface can only extend an identifier/qualified-name with optional type arguments. (1:21) +> 1 | interface A extends (typeof fs) { } + | ^^^^^^^^^^^" +`; + exports[`snippet: #0 format[typescript] 1`] = ` "Interface declaration can only extend an identifier/qualified name with optional type arguments. (1:21) > 1 | interface A extends (typeof fs) { } @@ -14,6 +20,12 @@ exports[`snippet: #0 format[typescript] 1`] = ` Cause: Interface declaration can only extend an identifier/qualified name with optional type arguments." `; +exports[`snippet: #0 format[yuku-ts] 1`] = ` +"Expected an identifier, but found '(' (1:21) +> 1 | interface A extends (typeof fs) { } + | ^" +`; + exports[`snippet: #1 format[babel-ts] 1`] = ` "'extends' list can only include identifiers or qualified-names with optional type arguments. (1:21) > 1 | interface B extends C['D'] { } @@ -21,6 +33,12 @@ exports[`snippet: #1 format[babel-ts] 1`] = ` Cause: 'extends' list can only include identifiers or qualified-names with optional type arguments. (1:20)" `; +exports[`snippet: #1 format[oxc-ts] 1`] = ` +"An interface can only extend an identifier/qualified-name with optional type arguments. (1:21) +> 1 | interface B extends C['D'] { } + | ^^^^^^" +`; + exports[`snippet: #1 format[typescript] 1`] = ` "Interface declaration can only extend an identifier/qualified name with optional type arguments. (1:21) > 1 | interface B extends C['D'] { } @@ -28,6 +46,12 @@ exports[`snippet: #1 format[typescript] 1`] = ` Cause: Interface declaration can only extend an identifier/qualified name with optional type arguments." `; +exports[`snippet: #1 format[yuku-ts] 1`] = ` +"Expected '{' to start an interface body, but found '[' (1:22) +> 1 | interface B extends C['D'] { } + | ^" +`; + exports[`snippet: #2 format[babel-ts] 1`] = ` "'extends' list can only include identifiers or qualified-names with optional type arguments. (1:21) > 1 | interface E extends F?.G { } @@ -35,6 +59,12 @@ exports[`snippet: #2 format[babel-ts] 1`] = ` Cause: 'extends' list can only include identifiers or qualified-names with optional type arguments. (1:20)" `; +exports[`snippet: #2 format[oxc-ts] 1`] = ` +"An interface can only extend an identifier/qualified-name with optional type arguments. (1:21) +> 1 | interface E extends F?.G { } + | ^^^^" +`; + exports[`snippet: #2 format[typescript] 1`] = ` "Interface declaration can only extend an identifier/qualified name with optional type arguments. (1:21) > 1 | interface E extends F?.G { } @@ -42,6 +72,12 @@ exports[`snippet: #2 format[typescript] 1`] = ` Cause: Interface declaration can only extend an identifier/qualified name with optional type arguments." `; +exports[`snippet: #2 format[yuku-ts] 1`] = ` +"Expected '{' to start an interface body, but found '?.' (1:22) +> 1 | interface E extends F?.G { } + | ^^" +`; + exports[`snippet: #3 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:23) > 1 | interface H extends I extends J { } @@ -49,6 +85,12 @@ exports[`snippet: #3 format[babel-ts] 1`] = ` Cause: Unexpected token, expected "," (1:22)" `; +exports[`snippet: #3 format[oxc-ts] 1`] = ` +"'extends' clause already seen (1:23) +> 1 | interface H extends I extends J { } + | ^^^^^^^" +`; + exports[`snippet: #3 format[typescript] 1`] = ` "'extends' clause already seen. (1:23) > 1 | interface H extends I extends J { } @@ -56,6 +98,12 @@ exports[`snippet: #3 format[typescript] 1`] = ` Cause: 'extends' clause already seen." `; +exports[`snippet: #3 format[yuku-ts] 1`] = ` +"Expected '{' to start an interface body, but found 'extends' (1:23) +> 1 | interface H extends I extends J { } + | ^^^^^^^" +`; + exports[`snippet: #4 format[babel-ts] 1`] = ` "'extends' list can only include identifiers or qualified-names with optional type arguments. (1:21) > 1 | interface K extends 2 { } @@ -63,6 +111,12 @@ exports[`snippet: #4 format[babel-ts] 1`] = ` Cause: 'extends' list can only include identifiers or qualified-names with optional type arguments. (1:20)" `; +exports[`snippet: #4 format[oxc-ts] 1`] = ` +"An interface can only extend an identifier/qualified-name with optional type arguments. (1:21) +> 1 | interface K extends 2 { } + | ^" +`; + exports[`snippet: #4 format[typescript] 1`] = ` "Interface declaration can only extend an identifier/qualified name with optional type arguments. (1:21) > 1 | interface K extends 2 { } @@ -70,6 +124,12 @@ exports[`snippet: #4 format[typescript] 1`] = ` Cause: Interface declaration can only extend an identifier/qualified name with optional type arguments." `; +exports[`snippet: #4 format[yuku-ts] 1`] = ` +"Expected an identifier, but found '2' (1:21) +> 1 | interface K extends 2 { } + | ^" +`; + exports[`snippet: #5 format[babel-ts] 1`] = ` "'extends' list can only include identifiers or qualified-names with optional type arguments. (1:21) > 1 | interface L extends M().N { } @@ -77,9 +137,21 @@ exports[`snippet: #5 format[babel-ts] 1`] = ` Cause: 'extends' list can only include identifiers or qualified-names with optional type arguments. (1:20)" `; +exports[`snippet: #5 format[oxc-ts] 1`] = ` +"An interface can only extend an identifier/qualified-name with optional type arguments. (1:21) +> 1 | interface L extends M().N { } + | ^^^^^" +`; + exports[`snippet: #5 format[typescript] 1`] = ` "Interface declaration can only extend an identifier/qualified name with optional type arguments. (1:21) > 1 | interface L extends M().N { } | ^^^^^ Cause: Interface declaration can only extend an identifier/qualified name with optional type arguments." `; + +exports[`snippet: #5 format[yuku-ts] 1`] = ` +"Expected '{' to start an interface body, but found '(' (1:22) +> 1 | interface L extends M().N { } + | ^" +`; diff --git a/tests/format/typescript/_errors_/invalid-interface-extends/format.test.js b/tests/format/typescript/_errors_/invalid-interface-extends/format.test.js index a5d3a3ad7..275c0c887 100644 --- a/tests/format/typescript/_errors_/invalid-interface-extends/format.test.js +++ b/tests/format/typescript/_errors_/invalid-interface-extends/format.test.js @@ -18,5 +18,5 @@ runFormatTest( "interface L extends M().N { }", ], }, - ["typescript", "babel-ts"], + ["typescript", "babel-ts", "oxc-ts", "yuku-ts"], ); diff --git a/tests/format/typescript/_errors_/invalid-interface-heritage-clause/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/invalid-interface-heritage-clause/__snapshots__/format.test.js.snap index 1b06dacbd..4c251233a 100644 --- a/tests/format/typescript/_errors_/invalid-interface-heritage-clause/__snapshots__/format.test.js.snap +++ b/tests/format/typescript/_errors_/invalid-interface-heritage-clause/__snapshots__/format.test.js.snap @@ -27,6 +27,12 @@ exports[`snippet: #0 format[typescript] 1`] = ` Cause: 'extends' list cannot be empty." `; +exports[`snippet: #0 format[yuku-ts] 1`] = ` +"Expected an identifier, but found '{' (1:23) +> 1 | interface Foo extends {} + | ^" +`; + exports[`snippet: #1 format[babel-ts] 1`] = ` "Unexpected token, expected "{" (1:13) > 1 | interface F implements {} @@ -47,6 +53,12 @@ exports[`snippet: #1 format[typescript] 1`] = ` Cause: Interface declaration cannot have 'implements' clause." `; +exports[`snippet: #1 format[yuku-ts] 1`] = ` +"Expected '{' to start an interface body, but found 'implements' (1:13) +> 1 | interface F implements {} + | ^^^^^^^^^^" +`; + exports[`snippet: #2 format[babel-ts] 1`] = ` "Unexpected token, expected "{" (1:13) > 1 | interface F implements A {} @@ -66,3 +78,9 @@ exports[`snippet: #2 format[typescript] 1`] = ` | ^^^^^^^^^^^^ Cause: Interface declaration cannot have 'implements' clause." `; + +exports[`snippet: #2 format[yuku-ts] 1`] = ` +"Expected '{' to start an interface body, but found 'implements' (1:13) +> 1 | interface F implements A {} + | ^^^^^^^^^^" +`; diff --git a/tests/format/typescript/_errors_/invalid-interface-heritage-clause/format.test.js b/tests/format/typescript/_errors_/invalid-interface-heritage-clause/format.test.js index 6144493eb..3b7a72fee 100644 --- a/tests/format/typescript/_errors_/invalid-interface-heritage-clause/format.test.js +++ b/tests/format/typescript/_errors_/invalid-interface-heritage-clause/format.test.js @@ -5,14 +5,21 @@ runFormatTest( "interface Foo extends {}", "interface F implements {}", "interface F implements A {}", + // "interface F extends implements {}", ], }, - ["typescript", "babel-ts", "oxc-ts"], + ["typescript", "babel-ts", "oxc-ts", "yuku-ts"], ); + runFormatTest( { importMeta: import.meta, snippets: ["interface F extends implements {}"], }, - ["typescript"], + [ + "typescript", + // "babel-ts", + // "oxc-ts", + // "yuku-ts", + ], ); diff --git a/tests/format/typescript/_errors_/invalid-typescript-decorators/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/invalid-typescript-decorators/__snapshots__/format.test.js.snap index 61273ebe6..2f3e85bc2 100644 --- a/tests/format/typescript/_errors_/invalid-typescript-decorators/__snapshots__/format.test.js.snap +++ b/tests/format/typescript/_errors_/invalid-typescript-decorators/__snapshots__/format.test.js.snap @@ -10,6 +10,15 @@ exports[`decorator.ts format[babel-ts] 1`] = ` Cause: Leading decorators must be attached to a class declaration. (4:0)" `; +exports[`decorator.ts format[oxc-ts] 1`] = ` +"Unexpected token (4:1) + 2 | + 3 | @dec +> 4 | enum E {} + | ^^^^ + 5 |" +`; + exports[`decorator.ts format[typescript] 1`] = ` "Decorators are not valid here. (3:1) 1 | declare function dec(target: T): T; @@ -21,6 +30,15 @@ exports[`decorator.ts format[typescript] 1`] = ` Cause: Decorators are not valid here." `; +exports[`decorator.ts format[yuku-ts] 1`] = ` +"Expected 'class' keyword, but found 'enum' (4:1) + 2 | + 3 | @dec +> 4 | enum E {} + | ^^^^ + 5 |" +`; + exports[`enums.ts format[babel-ts] 1`] = ` "Leading decorators must be attached to a class declaration. (4:1) 2 | @@ -33,6 +51,17 @@ exports[`enums.ts format[babel-ts] 1`] = ` Cause: Leading decorators must be attached to a class declaration. (4:0)" `; +exports[`enums.ts format[oxc-ts] 1`] = ` +"Unexpected token (4:1) + 2 | + 3 | @decorator() +> 4 | enum Direction { + | ^^^^ + 5 | Up = 1, + 6 | Down, + 7 | Left," +`; + exports[`enums.ts format[typescript] 1`] = ` "Decorators are not valid here. (3:1) 1 | // https://github.com/typescript-eslint/typescript-eslint/pull/2375 @@ -45,6 +74,17 @@ exports[`enums.ts format[typescript] 1`] = ` Cause: Decorators are not valid here." `; +exports[`enums.ts format[yuku-ts] 1`] = ` +"Expected 'class' keyword, but found 'enum' (4:1) + 2 | + 3 | @decorator() +> 4 | enum Direction { + | ^^^^ + 5 | Up = 1, + 6 | Down, + 7 | Left," +`; + exports[`function.ts format[babel-ts] 1`] = ` "Leading decorators must be attached to a class declaration. (4:1) 2 | @@ -55,6 +95,15 @@ exports[`function.ts format[babel-ts] 1`] = ` Cause: Leading decorators must be attached to a class declaration. (4:0)" `; +exports[`function.ts format[oxc-ts] 1`] = ` +"Unexpected token (4:1) + 2 | + 3 | @decorator() +> 4 | function foo( ){} + | ^^^^^^^^ + 5 |" +`; + exports[`function.ts format[typescript] 1`] = ` "Decorators are not valid here. (3:1) 1 | // https://github.com/typescript-eslint/typescript-eslint/pull/2375 @@ -66,6 +115,15 @@ exports[`function.ts format[typescript] 1`] = ` Cause: Decorators are not valid here." `; +exports[`function.ts format[yuku-ts] 1`] = ` +"Expected 'class' keyword, but found 'function' (4:1) + 2 | + 3 | @decorator() +> 4 | function foo( ){} + | ^^^^^^^^ + 5 |" +`; + exports[`interface.ts format[babel-ts] 1`] = ` "Leading decorators must be attached to a class declaration. (5:1) 3 | @@ -77,6 +135,16 @@ exports[`interface.ts format[babel-ts] 1`] = ` Cause: Leading decorators must be attached to a class declaration. (5:0)" `; +exports[`interface.ts format[oxc-ts] 1`] = ` +"Unexpected token (5:1) + 3 | + 4 | @hello() +> 5 | interface MyInterface {id: string; + | ^^^^^^^^^ + 6 | } + 7 |" +`; + exports[`interface.ts format[typescript] 1`] = ` "Decorators are not valid here. (4:1) 2 | // #4632 @@ -89,6 +157,16 @@ exports[`interface.ts format[typescript] 1`] = ` Cause: Decorators are not valid here." `; +exports[`interface.ts format[yuku-ts] 1`] = ` +"Expected 'class' keyword, but found 'interface' (5:1) + 3 | + 4 | @hello() +> 5 | interface MyInterface {id: string; + | ^^^^^^^^^ + 6 | } + 7 |" +`; + exports[`issue-9102.ts format[babel-ts] 1`] = ` "Leading decorators must be attached to a class declaration. (2:1) 1 | @Decorator() @@ -99,6 +177,15 @@ exports[`issue-9102.ts format[babel-ts] 1`] = ` Cause: Leading decorators must be attached to a class declaration. (2:0)" `; +exports[`issue-9102.ts format[oxc-ts] 1`] = ` +"Unexpected token (2:1) + 1 | @Decorator() +> 2 | type T = 1; + | ^^^^ + 3 | class C {} + 4 |" +`; + exports[`issue-9102.ts format[typescript] 1`] = ` "Decorators are not valid here. (1:1) > 1 | @Decorator() @@ -108,3 +195,12 @@ exports[`issue-9102.ts format[typescript] 1`] = ` 4 | Cause: Decorators are not valid here." `; + +exports[`issue-9102.ts format[yuku-ts] 1`] = ` +"Expected 'class' keyword, but found 'type' (2:1) + 1 | @Decorator() +> 2 | type T = 1; + | ^^^^ + 3 | class C {} + 4 |" +`; diff --git a/tests/format/typescript/_errors_/invalid-typescript-decorators/format.test.js b/tests/format/typescript/_errors_/invalid-typescript-decorators/format.test.js index d9c10157d..f78aea343 100644 --- a/tests/format/typescript/_errors_/invalid-typescript-decorators/format.test.js +++ b/tests/format/typescript/_errors_/invalid-typescript-decorators/format.test.js @@ -1 +1 @@ -runFormatTest(import.meta, ["typescript", "babel-ts"]); +runFormatTest(import.meta, ["typescript", "babel-ts", "oxc-ts", "yuku-ts"]); diff --git a/tests/format/typescript/_errors_/jsx/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/jsx/__snapshots__/format.test.js.snap index 94a9908a0..094c56fea 100644 --- a/tests/format/typescript/_errors_/jsx/__snapshots__/format.test.js.snap +++ b/tests/format/typescript/_errors_/jsx/__snapshots__/format.test.js.snap @@ -28,3 +28,12 @@ exports[`invalid-jsx-1.tsx format[typescript] 1`] = ` 4 | Cause: Unexpected token. Did you mean \`{'>'}\` or \`>\`?" `; + +exports[`invalid-jsx-1.tsx format[yuku-ts] 1`] = ` +"Unexpected '>' in JSX text (3:45) + 1 | // https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-9.html#-and--are-now-invalid-jsx-text-characters + 2 | +> 3 | let directions =
Navigate to: Menu Bar > Tools > Options
+ | ^ + 4 |" +`; diff --git a/tests/format/typescript/_errors_/jsx/format.test.js b/tests/format/typescript/_errors_/jsx/format.test.js index 1831abd0d..f78aea343 100644 --- a/tests/format/typescript/_errors_/jsx/format.test.js +++ b/tests/format/typescript/_errors_/jsx/format.test.js @@ -1 +1 @@ -runFormatTest(import.meta, ["typescript", "babel-ts", "oxc-ts"]); +runFormatTest(import.meta, ["typescript", "babel-ts", "oxc-ts", "yuku-ts"]); diff --git a/tests/format/typescript/_errors_/loop/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/loop/__snapshots__/format.test.js.snap index ec640f3ac..e35e69c69 100644 --- a/tests/format/typescript/_errors_/loop/__snapshots__/format.test.js.snap +++ b/tests/format/typescript/_errors_/loop/__snapshots__/format.test.js.snap @@ -20,6 +20,12 @@ exports[`snippet: #0 format[typescript] 1`] = ` Cause: Only a single variable declaration is allowed in a 'for...of' statement." `; +exports[`snippet: #0 format[yuku-ts] 1`] = ` +"Expected ';' after for-loop init, but found 'X' (1:13) +> 1 | for (var of X); + | ^" +`; + exports[`snippet: #1 format[babel-ts] 1`] = ` "Unexpected token (1:15) > 1 | for (var of of); @@ -40,6 +46,12 @@ exports[`snippet: #1 format[typescript] 1`] = ` Cause: Only a single variable declaration is allowed in a 'for...of' statement." `; +exports[`snippet: #1 format[yuku-ts] 1`] = ` +"Unexpected token ')' (1:15) +> 1 | for (var of of); + | ^" +`; + exports[`snippet: #2 format[babel-ts] 1`] = ` "Unexpected keyword 'in'. (1:10) > 1 | for (var in X); @@ -59,3 +71,9 @@ exports[`snippet: #2 format[typescript] 1`] = ` | ^^^ Cause: Only a single variable declaration is allowed in a 'for...in' statement." `; + +exports[`snippet: #2 format[yuku-ts] 1`] = ` +"'in' is reserved and cannot be used as a binding identifier (1:10) +> 1 | for (var in X); + | ^^" +`; diff --git a/tests/format/typescript/_errors_/loop/format.test.js b/tests/format/typescript/_errors_/loop/format.test.js index 88d6f1300..714e439bd 100644 --- a/tests/format/typescript/_errors_/loop/format.test.js +++ b/tests/format/typescript/_errors_/loop/format.test.js @@ -3,5 +3,5 @@ runFormatTest( importMeta: import.meta, snippets: ["for (var of X);", "for (var of of);", "for (var in X);"], }, - ["typescript", "babel-ts", "oxc-ts"], + ["typescript", "babel-ts", "oxc-ts", "yuku-ts"], ); diff --git a/tests/format/typescript/_errors_/mapped-type/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/mapped-type/__snapshots__/format.test.js.snap index 97e4b0730..51565b54d 100644 --- a/tests/format/typescript/_errors_/mapped-type/__snapshots__/format.test.js.snap +++ b/tests/format/typescript/_errors_/mapped-type/__snapshots__/format.test.js.snap @@ -31,3 +31,13 @@ exports[`mapped-type.ts format[typescript] 1`] = ` 5 | Cause: A mapped type may not declare properties or methods." `; + +exports[`mapped-type.ts format[yuku-ts] 1`] = ` +"Expected '}' to close a mapped type, but found 'extra_member' (3:3) + 1 | type Mapped = { + 2 | [key in keyof O]: number; +> 3 | extra_member: should_not_allowed + | ^^^^^^^^^^^^ + 4 | }; + 5 |" +`; diff --git a/tests/format/typescript/_errors_/mapped-type/format.test.js b/tests/format/typescript/_errors_/mapped-type/format.test.js index 1831abd0d..f78aea343 100644 --- a/tests/format/typescript/_errors_/mapped-type/format.test.js +++ b/tests/format/typescript/_errors_/mapped-type/format.test.js @@ -1 +1 @@ -runFormatTest(import.meta, ["typescript", "babel-ts", "oxc-ts"]); +runFormatTest(import.meta, ["typescript", "babel-ts", "oxc-ts", "yuku-ts"]); diff --git a/tests/format/typescript/_errors_/modifiers/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/modifiers/__snapshots__/format.test.js.snap index d7775cab8..b73568284 100644 --- a/tests/format/typescript/_errors_/modifiers/__snapshots__/format.test.js.snap +++ b/tests/format/typescript/_errors_/modifiers/__snapshots__/format.test.js.snap @@ -26,6 +26,14 @@ exports[`snippet: #0 format[typescript] 1`] = ` Cause: 'abstract' modifier cannot appear on a type member" `; +exports[`snippet: #0 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found 'method' (2:12) + 1 | interface Foo { +> 2 | abstract method(); + | ^^^^^^ + 3 | }" +`; + exports[`snippet: #1 format[babel-ts] 1`] = ` "'abstract' modifier cannot appear on a type member. (2:3) 1 | interface Foo { @@ -52,6 +60,14 @@ exports[`snippet: #1 format[typescript] 1`] = ` Cause: 'abstract' modifier cannot appear on a type member" `; +exports[`snippet: #1 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found 'property' (2:12) + 1 | interface Foo { +> 2 | abstract property; + | ^^^^^^^^ + 3 | }" +`; + exports[`snippet: #2 format[babel-ts] 1`] = ` "'abstract' modifier cannot appear on a type member. (2:3) 1 | interface Foo { @@ -78,6 +94,14 @@ exports[`snippet: #2 format[typescript] 1`] = ` Cause: 'abstract' modifier cannot appear on an index signature" `; +exports[`snippet: #2 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found '[' (2:12) + 1 | interface Foo { +> 2 | abstract [index: string]: number + | ^ + 3 | }" +`; + exports[`snippet: #3 format[babel-ts] 1`] = ` "'abstract' modifier cannot appear on a type member. (2:3) 1 | const foo: { @@ -104,6 +128,14 @@ exports[`snippet: #3 format[typescript] 1`] = ` Cause: 'abstract' modifier cannot appear on an index signature" `; +exports[`snippet: #3 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found '[' (2:12) + 1 | const foo: { +> 2 | abstract [index: string] : string + | ^ + 3 | } = {};" +`; + exports[`snippet: #4 format[babel-ts] 1`] = ` "Unexpected token, expected ";" (2:12) 1 | interface Foo { @@ -130,6 +162,14 @@ exports[`snippet: #4 format[typescript] 1`] = ` Cause: 'accessor' modifier cannot appear on a type member" `; +exports[`snippet: #4 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found 'method' (2:12) + 1 | interface Foo { +> 2 | accessor method(); + | ^^^^^^ + 3 | }" +`; + exports[`snippet: #5 format[babel-ts] 1`] = ` "Unexpected token, expected ";" (2:12) 1 | interface Foo { @@ -156,6 +196,14 @@ exports[`snippet: #5 format[typescript] 1`] = ` Cause: 'accessor' modifier cannot appear on a type member" `; +exports[`snippet: #5 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found 'property' (2:12) + 1 | interface Foo { +> 2 | accessor property; + | ^^^^^^^^ + 3 | }" +`; + exports[`snippet: #6 format[babel-ts] 1`] = ` "Unexpected token, expected ";" (2:12) 1 | interface Foo { @@ -182,6 +230,14 @@ exports[`snippet: #6 format[typescript] 1`] = ` Cause: 'accessor' modifier cannot appear on an index signature" `; +exports[`snippet: #6 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found '[' (2:12) + 1 | interface Foo { +> 2 | accessor [index: string]: number + | ^ + 3 | }" +`; + exports[`snippet: #7 format[babel-ts] 1`] = ` "Unexpected token, expected ";" (2:12) 1 | const foo: { @@ -208,6 +264,14 @@ exports[`snippet: #7 format[typescript] 1`] = ` Cause: 'accessor' modifier cannot appear on an index signature" `; +exports[`snippet: #7 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found '[' (2:12) + 1 | const foo: { +> 2 | accessor [index: string] : string + | ^ + 3 | } = {};" +`; + exports[`snippet: #8 format[babel-ts] 1`] = ` "Unexpected token, expected ";" (2:9) 1 | interface Foo { @@ -234,6 +298,14 @@ exports[`snippet: #8 format[typescript] 1`] = ` Cause: 'async' modifier cannot appear on a type member" `; +exports[`snippet: #8 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found 'method' (2:9) + 1 | interface Foo { +> 2 | async method(); + | ^^^^^^ + 3 | }" +`; + exports[`snippet: #9 format[babel-ts] 1`] = ` "Unexpected token, expected ";" (2:9) 1 | interface Foo { @@ -260,6 +332,14 @@ exports[`snippet: #9 format[typescript] 1`] = ` Cause: 'async' modifier cannot appear on a type member" `; +exports[`snippet: #9 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found 'property' (2:9) + 1 | interface Foo { +> 2 | async property; + | ^^^^^^^^ + 3 | }" +`; + exports[`snippet: #10 format[babel-ts] 1`] = ` "Unexpected token, expected ";" (2:9) 1 | interface Foo { @@ -286,6 +366,14 @@ exports[`snippet: #10 format[typescript] 1`] = ` Cause: 'async' modifier cannot appear on an index signature" `; +exports[`snippet: #10 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found '[' (2:9) + 1 | interface Foo { +> 2 | async [index: string]: number + | ^ + 3 | }" +`; + exports[`snippet: #11 format[babel-ts] 1`] = ` "Unexpected token, expected ";" (2:9) 1 | const foo: { @@ -312,6 +400,14 @@ exports[`snippet: #11 format[typescript] 1`] = ` Cause: 'async' modifier cannot appear on an index signature" `; +exports[`snippet: #11 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found '[' (2:9) + 1 | const foo: { +> 2 | async [index: string] : string + | ^ + 3 | } = {};" +`; + exports[`snippet: #12 format[babel-ts] 1`] = ` "Unexpected token, expected ";" (2:9) 1 | interface Foo { @@ -338,6 +434,14 @@ exports[`snippet: #12 format[typescript] 1`] = ` Cause: ';' expected." `; +exports[`snippet: #12 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found 'method' (2:9) + 1 | interface Foo { +> 2 | const method(); + | ^^^^^^ + 3 | }" +`; + exports[`snippet: #13 format[babel-ts] 1`] = ` "Unexpected token, expected ";" (2:9) 1 | interface Foo { @@ -364,6 +468,14 @@ exports[`snippet: #13 format[typescript] 1`] = ` Cause: ';' expected." `; +exports[`snippet: #13 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found 'property' (2:9) + 1 | interface Foo { +> 2 | const property; + | ^^^^^^^^ + 3 | }" +`; + exports[`snippet: #14 format[babel-ts] 1`] = ` "Unexpected token, expected ";" (2:9) 1 | interface Foo { @@ -390,6 +502,14 @@ exports[`snippet: #14 format[typescript] 1`] = ` Cause: ';' expected." `; +exports[`snippet: #14 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found '[' (2:9) + 1 | interface Foo { +> 2 | const [index: string]: number + | ^ + 3 | }" +`; + exports[`snippet: #15 format[babel-ts] 1`] = ` "Unexpected token, expected ";" (2:9) 1 | const foo: { @@ -416,6 +536,14 @@ exports[`snippet: #15 format[typescript] 1`] = ` Cause: ';' expected." `; +exports[`snippet: #15 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found '[' (2:9) + 1 | const foo: { +> 2 | const [index: string] : string + | ^ + 3 | } = {};" +`; + exports[`snippet: #16 format[babel-ts] 1`] = ` "'declare' modifier cannot appear on a type member. (2:3) 1 | interface Foo { @@ -442,6 +570,14 @@ exports[`snippet: #16 format[typescript] 1`] = ` Cause: 'declare' modifier cannot appear on a type member" `; +exports[`snippet: #16 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found 'method' (2:11) + 1 | interface Foo { +> 2 | declare method(); + | ^^^^^^ + 3 | }" +`; + exports[`snippet: #17 format[babel-ts] 1`] = ` "'declare' modifier cannot appear on a type member. (2:3) 1 | interface Foo { @@ -468,6 +604,14 @@ exports[`snippet: #17 format[typescript] 1`] = ` Cause: 'declare' modifier cannot appear on a type member" `; +exports[`snippet: #17 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found 'property' (2:11) + 1 | interface Foo { +> 2 | declare property; + | ^^^^^^^^ + 3 | }" +`; + exports[`snippet: #18 format[babel-ts] 1`] = ` "'declare' modifier cannot appear on a type member. (2:3) 1 | interface Foo { @@ -494,6 +638,14 @@ exports[`snippet: #18 format[typescript] 1`] = ` Cause: 'declare' modifier cannot appear on an index signature" `; +exports[`snippet: #18 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found '[' (2:11) + 1 | interface Foo { +> 2 | declare [index: string]: number + | ^ + 3 | }" +`; + exports[`snippet: #19 format[babel-ts] 1`] = ` "'declare' modifier cannot appear on a type member. (2:3) 1 | const foo: { @@ -520,6 +672,14 @@ exports[`snippet: #19 format[typescript] 1`] = ` Cause: 'declare' modifier cannot appear on an index signature" `; +exports[`snippet: #19 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found '[' (2:11) + 1 | const foo: { +> 2 | declare [index: string] : string + | ^ + 3 | } = {};" +`; + exports[`snippet: #20 format[babel-ts] 1`] = ` "Unexpected token, expected ";" (2:11) 1 | interface Foo { @@ -546,6 +706,14 @@ exports[`snippet: #20 format[typescript] 1`] = ` Cause: ';' expected." `; +exports[`snippet: #20 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found 'method' (2:11) + 1 | interface Foo { +> 2 | default method(); + | ^^^^^^ + 3 | }" +`; + exports[`snippet: #21 format[babel-ts] 1`] = ` "Unexpected token, expected ";" (2:11) 1 | interface Foo { @@ -572,6 +740,14 @@ exports[`snippet: #21 format[typescript] 1`] = ` Cause: ';' expected." `; +exports[`snippet: #21 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found 'property' (2:11) + 1 | interface Foo { +> 2 | default property; + | ^^^^^^^^ + 3 | }" +`; + exports[`snippet: #22 format[babel-ts] 1`] = ` "Unexpected token, expected ";" (2:11) 1 | interface Foo { @@ -598,6 +774,14 @@ exports[`snippet: #22 format[typescript] 1`] = ` Cause: ';' expected." `; +exports[`snippet: #22 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found '[' (2:11) + 1 | interface Foo { +> 2 | default [index: string]: number + | ^ + 3 | }" +`; + exports[`snippet: #23 format[babel-ts] 1`] = ` "Unexpected token, expected ";" (2:11) 1 | const foo: { @@ -624,6 +808,14 @@ exports[`snippet: #23 format[typescript] 1`] = ` Cause: ';' expected." `; +exports[`snippet: #23 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found '[' (2:11) + 1 | const foo: { +> 2 | default [index: string] : string + | ^ + 3 | } = {};" +`; + exports[`snippet: #24 format[babel-ts] 1`] = ` "Unexpected token, expected ";" (2:10) 1 | interface Foo { @@ -650,6 +842,14 @@ exports[`snippet: #24 format[typescript] 1`] = ` Cause: 'export' modifier cannot appear on a type member" `; +exports[`snippet: #24 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found 'method' (2:10) + 1 | interface Foo { +> 2 | export method(); + | ^^^^^^ + 3 | }" +`; + exports[`snippet: #25 format[babel-ts] 1`] = ` "Unexpected token, expected ";" (2:10) 1 | interface Foo { @@ -676,6 +876,14 @@ exports[`snippet: #25 format[typescript] 1`] = ` Cause: 'export' modifier cannot appear on a type member" `; +exports[`snippet: #25 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found 'property' (2:10) + 1 | interface Foo { +> 2 | export property; + | ^^^^^^^^ + 3 | }" +`; + exports[`snippet: #26 format[babel-ts] 1`] = ` "Unexpected token, expected ";" (2:10) 1 | interface Foo { @@ -702,6 +910,14 @@ exports[`snippet: #26 format[typescript] 1`] = ` Cause: 'export' modifier cannot appear on an index signature" `; +exports[`snippet: #26 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found '[' (2:10) + 1 | interface Foo { +> 2 | export [index: string]: number + | ^ + 3 | }" +`; + exports[`snippet: #27 format[babel-ts] 1`] = ` "Unexpected token, expected ";" (2:10) 1 | const foo: { @@ -728,6 +944,14 @@ exports[`snippet: #27 format[typescript] 1`] = ` Cause: 'export' modifier cannot appear on an index signature" `; +exports[`snippet: #27 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found '[' (2:10) + 1 | const foo: { +> 2 | export [index: string] : string + | ^ + 3 | } = {};" +`; + exports[`snippet: #28 format[babel-ts] 1`] = ` "Unexpected token, expected ";" (2:6) 1 | interface Foo { @@ -754,6 +978,14 @@ exports[`snippet: #28 format[typescript] 1`] = ` Cause: 'in' modifier cannot appear on a type member" `; +exports[`snippet: #28 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found 'method' (2:6) + 1 | interface Foo { +> 2 | in method(); + | ^^^^^^ + 3 | }" +`; + exports[`snippet: #29 format[babel-ts] 1`] = ` "Unexpected token, expected ";" (2:6) 1 | interface Foo { @@ -780,6 +1012,14 @@ exports[`snippet: #29 format[typescript] 1`] = ` Cause: 'in' modifier cannot appear on a type member" `; +exports[`snippet: #29 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found 'property' (2:6) + 1 | interface Foo { +> 2 | in property; + | ^^^^^^^^ + 3 | }" +`; + exports[`snippet: #30 format[babel-ts] 1`] = ` "Unexpected token, expected ";" (2:6) 1 | interface Foo { @@ -806,6 +1046,14 @@ exports[`snippet: #30 format[typescript] 1`] = ` Cause: 'in' modifier cannot appear on an index signature" `; +exports[`snippet: #30 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found '[' (2:6) + 1 | interface Foo { +> 2 | in [index: string]: number + | ^ + 3 | }" +`; + exports[`snippet: #31 format[babel-ts] 1`] = ` "Unexpected token, expected ";" (2:6) 1 | const foo: { @@ -832,6 +1080,14 @@ exports[`snippet: #31 format[typescript] 1`] = ` Cause: 'in' modifier cannot appear on an index signature" `; +exports[`snippet: #31 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found '[' (2:6) + 1 | const foo: { +> 2 | in [index: string] : string + | ^ + 3 | } = {};" +`; + exports[`snippet: #32 format[babel-ts] 1`] = ` "Unexpected token, expected ";" (2:7) 1 | interface Foo { @@ -858,6 +1114,14 @@ exports[`snippet: #32 format[typescript] 1`] = ` Cause: 'out' modifier cannot appear on a type member" `; +exports[`snippet: #32 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found 'method' (2:7) + 1 | interface Foo { +> 2 | out method(); + | ^^^^^^ + 3 | }" +`; + exports[`snippet: #33 format[babel-ts] 1`] = ` "Unexpected token, expected ";" (2:7) 1 | interface Foo { @@ -884,6 +1148,14 @@ exports[`snippet: #33 format[typescript] 1`] = ` Cause: 'out' modifier cannot appear on a type member" `; +exports[`snippet: #33 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found 'property' (2:7) + 1 | interface Foo { +> 2 | out property; + | ^^^^^^^^ + 3 | }" +`; + exports[`snippet: #34 format[babel-ts] 1`] = ` "Unexpected token, expected ";" (2:7) 1 | interface Foo { @@ -910,6 +1182,14 @@ exports[`snippet: #34 format[typescript] 1`] = ` Cause: 'out' modifier cannot appear on an index signature" `; +exports[`snippet: #34 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found '[' (2:7) + 1 | interface Foo { +> 2 | out [index: string]: number + | ^ + 3 | }" +`; + exports[`snippet: #35 format[babel-ts] 1`] = ` "Unexpected token, expected ";" (2:7) 1 | const foo: { @@ -936,6 +1216,14 @@ exports[`snippet: #35 format[typescript] 1`] = ` Cause: 'out' modifier cannot appear on an index signature" `; +exports[`snippet: #35 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found '[' (2:7) + 1 | const foo: { +> 2 | out [index: string] : string + | ^ + 3 | } = {};" +`; + exports[`snippet: #36 format[babel-ts] 1`] = ` "'override' modifier cannot appear on a type member. (2:3) 1 | interface Foo { @@ -962,6 +1250,14 @@ exports[`snippet: #36 format[typescript] 1`] = ` Cause: 'override' modifier cannot appear on a type member" `; +exports[`snippet: #36 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found 'method' (2:12) + 1 | interface Foo { +> 2 | override method(); + | ^^^^^^ + 3 | }" +`; + exports[`snippet: #37 format[babel-ts] 1`] = ` "'override' modifier cannot appear on a type member. (2:3) 1 | interface Foo { @@ -988,6 +1284,14 @@ exports[`snippet: #37 format[typescript] 1`] = ` Cause: 'override' modifier cannot appear on a type member" `; +exports[`snippet: #37 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found 'property' (2:12) + 1 | interface Foo { +> 2 | override property; + | ^^^^^^^^ + 3 | }" +`; + exports[`snippet: #38 format[babel-ts] 1`] = ` "'override' modifier cannot appear on a type member. (2:3) 1 | interface Foo { @@ -1014,6 +1318,14 @@ exports[`snippet: #38 format[typescript] 1`] = ` Cause: 'override' modifier cannot appear on an index signature" `; +exports[`snippet: #38 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found '[' (2:12) + 1 | interface Foo { +> 2 | override [index: string]: number + | ^ + 3 | }" +`; + exports[`snippet: #39 format[babel-ts] 1`] = ` "'override' modifier cannot appear on a type member. (2:3) 1 | const foo: { @@ -1040,6 +1352,14 @@ exports[`snippet: #39 format[typescript] 1`] = ` Cause: 'override' modifier cannot appear on an index signature" `; +exports[`snippet: #39 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found '[' (2:12) + 1 | const foo: { +> 2 | override [index: string] : string + | ^ + 3 | } = {};" +`; + exports[`snippet: #40 format[babel-ts] 1`] = ` "'private' modifier cannot appear on a type member. (2:3) 1 | interface Foo { @@ -1066,6 +1386,14 @@ exports[`snippet: #40 format[typescript] 1`] = ` Cause: 'private' modifier cannot appear on a type member" `; +exports[`snippet: #40 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found 'method' (2:11) + 1 | interface Foo { +> 2 | private method(); + | ^^^^^^ + 3 | }" +`; + exports[`snippet: #41 format[babel-ts] 1`] = ` "'private' modifier cannot appear on a type member. (2:3) 1 | interface Foo { @@ -1092,6 +1420,14 @@ exports[`snippet: #41 format[typescript] 1`] = ` Cause: 'private' modifier cannot appear on a type member" `; +exports[`snippet: #41 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found 'property' (2:11) + 1 | interface Foo { +> 2 | private property; + | ^^^^^^^^ + 3 | }" +`; + exports[`snippet: #42 format[babel-ts] 1`] = ` "'private' modifier cannot appear on a type member. (2:3) 1 | interface Foo { @@ -1118,6 +1454,14 @@ exports[`snippet: #42 format[typescript] 1`] = ` Cause: 'private' modifier cannot appear on an index signature" `; +exports[`snippet: #42 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found '[' (2:11) + 1 | interface Foo { +> 2 | private [index: string]: number + | ^ + 3 | }" +`; + exports[`snippet: #43 format[babel-ts] 1`] = ` "'private' modifier cannot appear on a type member. (2:3) 1 | const foo: { @@ -1144,6 +1488,14 @@ exports[`snippet: #43 format[typescript] 1`] = ` Cause: 'private' modifier cannot appear on an index signature" `; +exports[`snippet: #43 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found '[' (2:11) + 1 | const foo: { +> 2 | private [index: string] : string + | ^ + 3 | } = {};" +`; + exports[`snippet: #44 format[babel-ts] 1`] = ` "'protected' modifier cannot appear on a type member. (2:3) 1 | interface Foo { @@ -1170,6 +1522,14 @@ exports[`snippet: #44 format[typescript] 1`] = ` Cause: 'protected' modifier cannot appear on a type member" `; +exports[`snippet: #44 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found 'method' (2:13) + 1 | interface Foo { +> 2 | protected method(); + | ^^^^^^ + 3 | }" +`; + exports[`snippet: #45 format[babel-ts] 1`] = ` "'protected' modifier cannot appear on a type member. (2:3) 1 | interface Foo { @@ -1196,6 +1556,14 @@ exports[`snippet: #45 format[typescript] 1`] = ` Cause: 'protected' modifier cannot appear on a type member" `; +exports[`snippet: #45 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found 'property' (2:13) + 1 | interface Foo { +> 2 | protected property; + | ^^^^^^^^ + 3 | }" +`; + exports[`snippet: #46 format[babel-ts] 1`] = ` "'protected' modifier cannot appear on a type member. (2:3) 1 | interface Foo { @@ -1222,6 +1590,14 @@ exports[`snippet: #46 format[typescript] 1`] = ` Cause: 'protected' modifier cannot appear on an index signature" `; +exports[`snippet: #46 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found '[' (2:13) + 1 | interface Foo { +> 2 | protected [index: string]: number + | ^ + 3 | }" +`; + exports[`snippet: #47 format[babel-ts] 1`] = ` "'protected' modifier cannot appear on a type member. (2:3) 1 | const foo: { @@ -1248,6 +1624,14 @@ exports[`snippet: #47 format[typescript] 1`] = ` Cause: 'protected' modifier cannot appear on an index signature" `; +exports[`snippet: #47 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found '[' (2:13) + 1 | const foo: { +> 2 | protected [index: string] : string + | ^ + 3 | } = {};" +`; + exports[`snippet: #48 format[babel-ts] 1`] = ` "'public' modifier cannot appear on a type member. (2:3) 1 | interface Foo { @@ -1274,6 +1658,14 @@ exports[`snippet: #48 format[typescript] 1`] = ` Cause: 'public' modifier cannot appear on a type member" `; +exports[`snippet: #48 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found 'method' (2:10) + 1 | interface Foo { +> 2 | public method(); + | ^^^^^^ + 3 | }" +`; + exports[`snippet: #49 format[babel-ts] 1`] = ` "'public' modifier cannot appear on a type member. (2:3) 1 | interface Foo { @@ -1300,6 +1692,14 @@ exports[`snippet: #49 format[typescript] 1`] = ` Cause: 'public' modifier cannot appear on a type member" `; +exports[`snippet: #49 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found 'property' (2:10) + 1 | interface Foo { +> 2 | public property; + | ^^^^^^^^ + 3 | }" +`; + exports[`snippet: #50 format[babel-ts] 1`] = ` "'public' modifier cannot appear on a type member. (2:3) 1 | interface Foo { @@ -1326,6 +1726,14 @@ exports[`snippet: #50 format[typescript] 1`] = ` Cause: 'public' modifier cannot appear on an index signature" `; +exports[`snippet: #50 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found '[' (2:10) + 1 | interface Foo { +> 2 | public [index: string]: number + | ^ + 3 | }" +`; + exports[`snippet: #51 format[babel-ts] 1`] = ` "'public' modifier cannot appear on a type member. (2:3) 1 | const foo: { @@ -1352,6 +1760,14 @@ exports[`snippet: #51 format[typescript] 1`] = ` Cause: 'public' modifier cannot appear on an index signature" `; +exports[`snippet: #51 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found '[' (2:10) + 1 | const foo: { +> 2 | public [index: string] : string + | ^ + 3 | } = {};" +`; + exports[`snippet: #52 format[babel-ts] 1`] = ` "'static' modifier cannot appear on a type member. (2:3) 1 | interface Foo { @@ -1378,6 +1794,14 @@ exports[`snippet: #52 format[typescript] 1`] = ` Cause: 'static' modifier cannot appear on a type member" `; +exports[`snippet: #52 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found 'method' (2:10) + 1 | interface Foo { +> 2 | static method(); + | ^^^^^^ + 3 | }" +`; + exports[`snippet: #53 format[babel-ts] 1`] = ` "'static' modifier cannot appear on a type member. (2:3) 1 | interface Foo { @@ -1404,6 +1828,14 @@ exports[`snippet: #53 format[typescript] 1`] = ` Cause: 'static' modifier cannot appear on a type member" `; +exports[`snippet: #53 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found 'property' (2:10) + 1 | interface Foo { +> 2 | static property; + | ^^^^^^^^ + 3 | }" +`; + exports[`snippet: #54 format[babel-ts] 1`] = ` "'static' modifier cannot appear on a type member. (2:3) 1 | interface Foo { @@ -1430,6 +1862,14 @@ exports[`snippet: #54 format[typescript] 1`] = ` Cause: 'static' modifier cannot appear on an index signature" `; +exports[`snippet: #54 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found '[' (2:10) + 1 | interface Foo { +> 2 | static [index: string]: number + | ^ + 3 | }" +`; + exports[`snippet: #55 format[babel-ts] 1`] = ` "'static' modifier cannot appear on a type member. (2:3) 1 | const foo: { @@ -1456,6 +1896,14 @@ exports[`snippet: #55 format[typescript] 1`] = ` Cause: 'static' modifier cannot appear on an index signature" `; +exports[`snippet: #55 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found '[' (2:10) + 1 | const foo: { +> 2 | static [index: string] : string + | ^ + 3 | } = {};" +`; + exports[`snippet: #56 format[babel-ts] 1`] = ` "'readonly' modifier can only appear on a property declaration or index signature. (2:3) 1 | interface Foo { @@ -1482,6 +1930,14 @@ exports[`snippet: #56 format[typescript] 1`] = ` Cause: 'readonly' modifier can only appear on a property declaration or index signature." `; +exports[`snippet: #56 format[yuku-ts] 1`] = ` +"A 'readonly' modifier can only appear on a property declaration or index signature (2:3) + 1 | interface Foo { +> 2 | readonly method(); + | ^^^^^^^^^^^^^^^ + 3 | }" +`; + exports[`snippet: #57 format[babel-ts] 1`] = ` "'abstract' modifier can only appear on a class, method, or property declaration. (1:1) > 1 | abstract interface Foo {} @@ -1502,6 +1958,12 @@ exports[`snippet: #57 format[typescript] 1`] = ` Cause: 'abstract' modifier can only appear on a class, method, or property declaration." `; +exports[`snippet: #57 format[yuku-ts] 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found 'interface' (1:10) +> 1 | abstract interface Foo {} + | ^^^^^^^^^" +`; + exports[`snippet: #58 format[babel-ts] 1`] = ` "Missing semicolon. (1:9) > 1 | accessor interface Foo {} @@ -1522,6 +1984,12 @@ exports[`snippet: #58 format[typescript] 1`] = ` Cause: 'accessor' modifier can only appear on a property declaration." `; +exports[`snippet: #58 format[yuku-ts] 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found 'interface' (1:10) +> 1 | accessor interface Foo {} + | ^^^^^^^^^" +`; + exports[`snippet: #59 format[babel-ts] 1`] = ` "Missing semicolon. (1:6) > 1 | async interface Foo {} @@ -1542,6 +2010,12 @@ exports[`snippet: #59 format[typescript] 1`] = ` Cause: 'async' modifier cannot be used here." `; +exports[`snippet: #59 format[yuku-ts] 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found 'interface' (1:7) +> 1 | async interface Foo {} + | ^^^^^^^^^" +`; + exports[`snippet: #60 format[babel-ts] 1`] = ` "Missing semicolon. (1:16) > 1 | const interface Foo {} @@ -1562,6 +2036,12 @@ exports[`snippet: #60 format[typescript] 1`] = ` Cause: ',' expected." `; +exports[`snippet: #60 format[yuku-ts] 1`] = ` +"'const' declarations must be initialized (1:7) +> 1 | const interface Foo {} + | ^^^^^^^^^" +`; + exports[`snippet: #61 format[babel-ts] 1`] = ` "Unexpected token (1:1) > 1 | default interface Foo {} @@ -1582,6 +2062,12 @@ exports[`snippet: #61 format[typescript] 1`] = ` Cause: 'export' expected." `; +exports[`snippet: #61 format[yuku-ts] 1`] = ` +"'default' is reserved and cannot be used as an identifier (1:1) +> 1 | default interface Foo {} + | ^^^^^^^" +`; + exports[`snippet: #62 format[babel-ts] 1`] = ` "Unexpected token (1:1) > 1 | in interface Foo {} @@ -1602,6 +2088,12 @@ exports[`snippet: #62 format[typescript] 1`] = ` Cause: Expression expected." `; +exports[`snippet: #62 format[yuku-ts] 1`] = ` +"'in' is reserved and cannot be used as an identifier (1:1) +> 1 | in interface Foo {} + | ^^" +`; + exports[`snippet: #63 format[babel-ts] 1`] = ` "Missing semicolon. (1:4) > 1 | out interface Foo {} @@ -1622,6 +2114,12 @@ exports[`snippet: #63 format[typescript] 1`] = ` Cause: Unexpected keyword or identifier." `; +exports[`snippet: #63 format[yuku-ts] 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found 'interface' (1:5) +> 1 | out interface Foo {} + | ^^^^^^^^^" +`; + exports[`snippet: #64 format[babel-ts] 1`] = ` "Missing semicolon. (1:9) > 1 | override interface Foo {} @@ -1642,6 +2140,12 @@ exports[`snippet: #64 format[typescript] 1`] = ` Cause: Unexpected keyword or identifier." `; +exports[`snippet: #64 format[yuku-ts] 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found 'interface' (1:10) +> 1 | override interface Foo {} + | ^^^^^^^^^" +`; + exports[`snippet: #65 format[babel-ts] 1`] = ` "Missing semicolon. (1:8) > 1 | private interface Foo {} @@ -1662,6 +2166,12 @@ exports[`snippet: #65 format[typescript] 1`] = ` Cause: 'private' modifier cannot appear on a module or namespace element." `; +exports[`snippet: #65 format[yuku-ts] 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found 'interface' (1:9) +> 1 | private interface Foo {} + | ^^^^^^^^^" +`; + exports[`snippet: #66 format[babel-ts] 1`] = ` "Missing semicolon. (1:10) > 1 | protected interface Foo {} @@ -1682,6 +2192,12 @@ exports[`snippet: #66 format[typescript] 1`] = ` Cause: 'protected' modifier cannot appear on a module or namespace element." `; +exports[`snippet: #66 format[yuku-ts] 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found 'interface' (1:11) +> 1 | protected interface Foo {} + | ^^^^^^^^^" +`; + exports[`snippet: #67 format[babel-ts] 1`] = ` "Missing semicolon. (1:7) > 1 | public interface Foo {} @@ -1702,6 +2218,12 @@ exports[`snippet: #67 format[typescript] 1`] = ` Cause: 'public' modifier cannot appear on a module or namespace element." `; +exports[`snippet: #67 format[yuku-ts] 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found 'interface' (1:8) +> 1 | public interface Foo {} + | ^^^^^^^^^" +`; + exports[`snippet: #68 format[babel-ts] 1`] = ` "Missing semicolon. (1:9) > 1 | readonly interface Foo {} @@ -1722,6 +2244,12 @@ exports[`snippet: #68 format[typescript] 1`] = ` Cause: 'readonly' modifier can only appear on a property declaration or index signature." `; +exports[`snippet: #68 format[yuku-ts] 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found 'interface' (1:10) +> 1 | readonly interface Foo {} + | ^^^^^^^^^" +`; + exports[`snippet: #69 format[babel-ts] 1`] = ` "Missing semicolon. (1:7) > 1 | static interface Foo {} @@ -1742,6 +2270,12 @@ exports[`snippet: #69 format[typescript] 1`] = ` Cause: 'static' modifier cannot appear on a module or namespace element." `; +exports[`snippet: #69 format[yuku-ts] 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found 'interface' (1:8) +> 1 | static interface Foo {} + | ^^^^^^^^^" +`; + exports[`snippet: #70 format[babel-ts] 1`] = ` "'abstract' modifier cannot appear on a type parameter. (1:15) > 1 | interface Foo {} @@ -1762,6 +2296,12 @@ exports[`snippet: #70 format[typescript] 1`] = ` Cause: 'abstract' modifier cannot appear on a type parameter" `; +exports[`snippet: #70 format[yuku-ts] 1`] = ` +"Expected '>' to close a type parameter list, but found 'T' (1:24) +> 1 | interface Foo {} + | ^" +`; + exports[`snippet: #71 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:24) > 1 | interface Foo {} @@ -1782,6 +2322,12 @@ exports[`snippet: #71 format[typescript] 1`] = ` Cause: 'accessor' modifier cannot appear on a type parameter" `; +exports[`snippet: #71 format[yuku-ts] 1`] = ` +"Expected '>' to close a type parameter list, but found 'T' (1:24) +> 1 | interface Foo {} + | ^" +`; + exports[`snippet: #72 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:21) > 1 | interface Foo {} @@ -1802,6 +2348,12 @@ exports[`snippet: #72 format[typescript] 1`] = ` Cause: 'async' modifier cannot appear on a type parameter" `; +exports[`snippet: #72 format[yuku-ts] 1`] = ` +"Expected '>' to close a type parameter list, but found 'T' (1:21) +> 1 | interface Foo {} + | ^" +`; + exports[`snippet: #73 format[babel-ts] 1`] = ` "'declare' modifier cannot appear on a type parameter. (1:15) > 1 | interface Foo {} @@ -1822,6 +2374,12 @@ exports[`snippet: #73 format[typescript] 1`] = ` Cause: 'declare' modifier cannot appear on a type parameter" `; +exports[`snippet: #73 format[yuku-ts] 1`] = ` +"Expected '>' to close a type parameter list, but found 'T' (1:23) +> 1 | interface Foo {} + | ^" +`; + exports[`snippet: #74 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:23) > 1 | interface Foo {} @@ -1842,6 +2400,12 @@ exports[`snippet: #74 format[typescript] 1`] = ` Cause: Type parameter declaration expected." `; +exports[`snippet: #74 format[yuku-ts] 1`] = ` +"'default' is reserved and cannot be used as a binding identifier (1:15) +> 1 | interface Foo {} + | ^^^^^^^" +`; + exports[`snippet: #75 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:22) > 1 | interface Foo {} @@ -1862,6 +2426,12 @@ exports[`snippet: #75 format[typescript] 1`] = ` Cause: Type parameter declaration expected." `; +exports[`snippet: #75 format[yuku-ts] 1`] = ` +"'export' is reserved and cannot be used as a binding identifier (1:15) +> 1 | interface Foo {} + | ^^^^^^" +`; + exports[`snippet: #76 format[babel-ts] 1`] = ` "'override' modifier cannot appear on a type parameter. (1:15) > 1 | interface Foo {} @@ -1882,6 +2452,12 @@ exports[`snippet: #76 format[typescript] 1`] = ` Cause: 'override' modifier cannot appear on a type parameter" `; +exports[`snippet: #76 format[yuku-ts] 1`] = ` +"Expected '>' to close a type parameter list, but found 'T' (1:24) +> 1 | interface Foo {} + | ^" +`; + exports[`snippet: #77 format[babel-ts] 1`] = ` "'private' modifier cannot appear on a type parameter. (1:15) > 1 | interface Foo {} @@ -1902,6 +2478,12 @@ exports[`snippet: #77 format[typescript] 1`] = ` Cause: 'private' modifier cannot appear on a type parameter" `; +exports[`snippet: #77 format[yuku-ts] 1`] = ` +"Expected '>' to close a type parameter list, but found 'T' (1:23) +> 1 | interface Foo {} + | ^" +`; + exports[`snippet: #78 format[babel-ts] 1`] = ` "'protected' modifier cannot appear on a type parameter. (1:15) > 1 | interface Foo {} @@ -1922,6 +2504,12 @@ exports[`snippet: #78 format[typescript] 1`] = ` Cause: 'protected' modifier cannot appear on a type parameter" `; +exports[`snippet: #78 format[yuku-ts] 1`] = ` +"Expected '>' to close a type parameter list, but found 'T' (1:25) +> 1 | interface Foo {} + | ^" +`; + exports[`snippet: #79 format[babel-ts] 1`] = ` "'public' modifier cannot appear on a type parameter. (1:15) > 1 | interface Foo {} @@ -1942,6 +2530,12 @@ exports[`snippet: #79 format[typescript] 1`] = ` Cause: 'public' modifier cannot appear on a type parameter" `; +exports[`snippet: #79 format[yuku-ts] 1`] = ` +"Expected '>' to close a type parameter list, but found 'T' (1:22) +> 1 | interface Foo {} + | ^" +`; + exports[`snippet: #80 format[babel-ts] 1`] = ` "'readonly' modifier cannot appear on a type parameter. (1:15) > 1 | interface Foo {} @@ -1962,6 +2556,12 @@ exports[`snippet: #80 format[typescript] 1`] = ` Cause: 'readonly' modifier cannot appear on a type parameter" `; +exports[`snippet: #80 format[yuku-ts] 1`] = ` +"Expected '>' to close a type parameter list, but found 'T' (1:24) +> 1 | interface Foo {} + | ^" +`; + exports[`snippet: #81 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:22) > 1 | interface Foo {} @@ -1982,6 +2582,12 @@ exports[`snippet: #81 format[typescript] 1`] = ` Cause: 'static' modifier cannot appear on a type parameter" `; +exports[`snippet: #81 format[yuku-ts] 1`] = ` +"Expected '>' to close a type parameter list, but found 'T' (1:22) +> 1 | interface Foo {} + | ^" +`; + exports[`snippet: #82 format[babel-ts] 1`] = ` "Class methods cannot have the 'declare' modifier. (2:3) 1 | class Foo { @@ -2008,6 +2614,14 @@ exports[`snippet: #82 format[typescript] 1`] = ` Cause: 'declare' modifier cannot appear on class elements of this kind." `; +exports[`snippet: #82 format[yuku-ts] 1`] = ` +"A 'declare' modifier cannot appear on a class element of this kind (2:11) + 1 | class Foo { +> 2 | declare method() {} + | ^^^^^^ + 3 | }" +`; + exports[`snippet: #83 format[babel-ts] 1`] = ` "Class methods cannot have the 'readonly' modifier. (2:3) 1 | class Foo { @@ -2034,6 +2648,14 @@ exports[`snippet: #83 format[typescript] 1`] = ` Cause: 'readonly' modifier can only appear on a property declaration or index signature." `; +exports[`snippet: #83 format[yuku-ts] 1`] = ` +"A 'readonly' modifier can only appear on a property declaration or index signature (2:12) + 1 | class Foo { +> 2 | readonly method() {} + | ^^^^^^ + 3 | }" +`; + exports[`snippet: #84 format[babel-ts] 1`] = ` "'declare' is not allowed in getters. (2:3) 1 | class Foo { @@ -2060,6 +2682,14 @@ exports[`snippet: #84 format[typescript] 1`] = ` Cause: 'declare' modifier cannot appear on class elements of this kind." `; +exports[`snippet: #84 format[yuku-ts] 1`] = ` +"A 'declare' modifier cannot appear on a class element of this kind (2:15) + 1 | class Foo { +> 2 | declare get getter() {} + | ^^^^^^ + 3 | }" +`; + exports[`snippet: #85 format[babel-ts] 1`] = ` "'declare' is not allowed in setters. (2:3) 1 | class Foo { @@ -2086,6 +2716,14 @@ exports[`snippet: #85 format[typescript] 1`] = ` Cause: 'declare' modifier cannot appear on class elements of this kind." `; +exports[`snippet: #85 format[yuku-ts] 1`] = ` +"A 'declare' modifier cannot appear on a class element of this kind (2:15) + 1 | class Foo { +> 2 | declare set setter(v) {} + | ^^^^^^ + 3 | }" +`; + exports[`snippet: #86 format[babel-ts] 1`] = ` "Unexpected token, expected "class" (1:10) > 1 | abstract module Foo {} @@ -2106,6 +2744,12 @@ exports[`snippet: #86 format[typescript] 1`] = ` Cause: 'abstract' modifier can only appear on a class, method, or property declaration." `; +exports[`snippet: #86 format[yuku-ts] 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found 'module' (1:10) +> 1 | abstract module Foo {} + | ^^^^^^" +`; + exports[`snippet: #87 format[babel-ts] 1`] = ` "Unexpected token, expected "class" (1:10) > 1 | abstract namespace Foo {} @@ -2126,6 +2770,12 @@ exports[`snippet: #87 format[typescript] 1`] = ` Cause: 'abstract' modifier can only appear on a class, method, or property declaration." `; +exports[`snippet: #87 format[yuku-ts] 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found 'namespace' (1:10) +> 1 | abstract namespace Foo {} + | ^^^^^^^^^" +`; + exports[`snippet: #88 format[babel-ts] 1`] = ` "Missing semicolon. (1:9) > 1 | accessor module Foo {} @@ -2146,6 +2796,12 @@ exports[`snippet: #88 format[typescript] 1`] = ` Cause: 'accessor' modifier can only appear on a property declaration." `; +exports[`snippet: #88 format[yuku-ts] 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found 'module' (1:10) +> 1 | accessor module Foo {} + | ^^^^^^" +`; + exports[`snippet: #89 format[babel-ts] 1`] = ` "Missing semicolon. (1:9) > 1 | accessor namespace Foo {} @@ -2166,6 +2822,12 @@ exports[`snippet: #89 format[typescript] 1`] = ` Cause: 'accessor' modifier can only appear on a property declaration." `; +exports[`snippet: #89 format[yuku-ts] 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found 'namespace' (1:10) +> 1 | accessor namespace Foo {} + | ^^^^^^^^^" +`; + exports[`snippet: #90 format[babel-ts] 1`] = ` "Missing semicolon. (1:6) > 1 | async module Foo {} @@ -2186,6 +2848,12 @@ exports[`snippet: #90 format[typescript] 1`] = ` Cause: 'async' modifier cannot be used here." `; +exports[`snippet: #90 format[yuku-ts] 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found 'module' (1:7) +> 1 | async module Foo {} + | ^^^^^^" +`; + exports[`snippet: #91 format[babel-ts] 1`] = ` "Missing semicolon. (1:6) > 1 | async namespace Foo {} @@ -2206,6 +2874,12 @@ exports[`snippet: #91 format[typescript] 1`] = ` Cause: 'async' modifier cannot be used here." `; +exports[`snippet: #91 format[yuku-ts] 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found 'namespace' (1:7) +> 1 | async namespace Foo {} + | ^^^^^^^^^" +`; + exports[`snippet: #92 format[babel-ts] 1`] = ` "Missing semicolon. (1:13) > 1 | const module Foo {} @@ -2226,6 +2900,12 @@ exports[`snippet: #92 format[typescript] 1`] = ` Cause: ',' expected." `; +exports[`snippet: #92 format[yuku-ts] 1`] = ` +"'const' declarations must be initialized (1:7) +> 1 | const module Foo {} + | ^^^^^^" +`; + exports[`snippet: #93 format[babel-ts] 1`] = ` "Missing semicolon. (1:16) > 1 | const namespace Foo {} @@ -2246,6 +2926,12 @@ exports[`snippet: #93 format[typescript] 1`] = ` Cause: ',' expected." `; +exports[`snippet: #93 format[yuku-ts] 1`] = ` +"'const' declarations must be initialized (1:7) +> 1 | const namespace Foo {} + | ^^^^^^^^^" +`; + exports[`snippet: #94 format[babel-ts] 1`] = ` "Unexpected token (1:1) > 1 | default module Foo {} @@ -2266,6 +2952,12 @@ exports[`snippet: #94 format[typescript] 1`] = ` Cause: 'export' expected." `; +exports[`snippet: #94 format[yuku-ts] 1`] = ` +"'default' is reserved and cannot be used as an identifier (1:1) +> 1 | default module Foo {} + | ^^^^^^^" +`; + exports[`snippet: #95 format[babel-ts] 1`] = ` "Unexpected token (1:1) > 1 | default namespace Foo {} @@ -2286,6 +2978,12 @@ exports[`snippet: #95 format[typescript] 1`] = ` Cause: 'export' expected." `; +exports[`snippet: #95 format[yuku-ts] 1`] = ` +"'default' is reserved and cannot be used as an identifier (1:1) +> 1 | default namespace Foo {} + | ^^^^^^^" +`; + exports[`snippet: #96 format[babel-ts] 1`] = ` "Unexpected token (1:1) > 1 | in module Foo {} @@ -2306,6 +3004,12 @@ exports[`snippet: #96 format[typescript] 1`] = ` Cause: Expression expected." `; +exports[`snippet: #96 format[yuku-ts] 1`] = ` +"'in' is reserved and cannot be used as an identifier (1:1) +> 1 | in module Foo {} + | ^^" +`; + exports[`snippet: #97 format[babel-ts] 1`] = ` "Unexpected token (1:1) > 1 | in namespace Foo {} @@ -2326,6 +3030,12 @@ exports[`snippet: #97 format[typescript] 1`] = ` Cause: Expression expected." `; +exports[`snippet: #97 format[yuku-ts] 1`] = ` +"'in' is reserved and cannot be used as an identifier (1:1) +> 1 | in namespace Foo {} + | ^^" +`; + exports[`snippet: #98 format[babel-ts] 1`] = ` "Missing semicolon. (1:4) > 1 | out module Foo {} @@ -2346,6 +3056,12 @@ exports[`snippet: #98 format[typescript] 1`] = ` Cause: Unexpected keyword or identifier." `; +exports[`snippet: #98 format[yuku-ts] 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found 'module' (1:5) +> 1 | out module Foo {} + | ^^^^^^" +`; + exports[`snippet: #99 format[babel-ts] 1`] = ` "Missing semicolon. (1:4) > 1 | out namespace Foo {} @@ -2366,6 +3082,12 @@ exports[`snippet: #99 format[typescript] 1`] = ` Cause: Unexpected keyword or identifier." `; +exports[`snippet: #99 format[yuku-ts] 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found 'namespace' (1:5) +> 1 | out namespace Foo {} + | ^^^^^^^^^" +`; + exports[`snippet: #100 format[babel-ts] 1`] = ` "Missing semicolon. (1:9) > 1 | override module Foo {} @@ -2386,6 +3108,12 @@ exports[`snippet: #100 format[typescript] 1`] = ` Cause: Unexpected keyword or identifier." `; +exports[`snippet: #100 format[yuku-ts] 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found 'module' (1:10) +> 1 | override module Foo {} + | ^^^^^^" +`; + exports[`snippet: #101 format[babel-ts] 1`] = ` "Missing semicolon. (1:9) > 1 | override namespace Foo {} @@ -2406,6 +3134,12 @@ exports[`snippet: #101 format[typescript] 1`] = ` Cause: Unexpected keyword or identifier." `; +exports[`snippet: #101 format[yuku-ts] 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found 'namespace' (1:10) +> 1 | override namespace Foo {} + | ^^^^^^^^^" +`; + exports[`snippet: #102 format[babel-ts] 1`] = ` "Missing semicolon. (1:8) > 1 | private module Foo {} @@ -2426,6 +3160,12 @@ exports[`snippet: #102 format[typescript] 1`] = ` Cause: 'private' modifier cannot appear on a module or namespace element." `; +exports[`snippet: #102 format[yuku-ts] 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found 'module' (1:9) +> 1 | private module Foo {} + | ^^^^^^" +`; + exports[`snippet: #103 format[babel-ts] 1`] = ` "Missing semicolon. (1:8) > 1 | private namespace Foo {} @@ -2446,6 +3186,12 @@ exports[`snippet: #103 format[typescript] 1`] = ` Cause: 'private' modifier cannot appear on a module or namespace element." `; +exports[`snippet: #103 format[yuku-ts] 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found 'namespace' (1:9) +> 1 | private namespace Foo {} + | ^^^^^^^^^" +`; + exports[`snippet: #104 format[babel-ts] 1`] = ` "Missing semicolon. (1:10) > 1 | protected module Foo {} @@ -2466,6 +3212,12 @@ exports[`snippet: #104 format[typescript] 1`] = ` Cause: 'protected' modifier cannot appear on a module or namespace element." `; +exports[`snippet: #104 format[yuku-ts] 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found 'module' (1:11) +> 1 | protected module Foo {} + | ^^^^^^" +`; + exports[`snippet: #105 format[babel-ts] 1`] = ` "Missing semicolon. (1:10) > 1 | protected namespace Foo {} @@ -2486,6 +3238,12 @@ exports[`snippet: #105 format[typescript] 1`] = ` Cause: 'protected' modifier cannot appear on a module or namespace element." `; +exports[`snippet: #105 format[yuku-ts] 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found 'namespace' (1:11) +> 1 | protected namespace Foo {} + | ^^^^^^^^^" +`; + exports[`snippet: #106 format[babel-ts] 1`] = ` "Missing semicolon. (1:7) > 1 | public module Foo {} @@ -2506,6 +3264,12 @@ exports[`snippet: #106 format[typescript] 1`] = ` Cause: 'public' modifier cannot appear on a module or namespace element." `; +exports[`snippet: #106 format[yuku-ts] 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found 'module' (1:8) +> 1 | public module Foo {} + | ^^^^^^" +`; + exports[`snippet: #107 format[babel-ts] 1`] = ` "Missing semicolon. (1:7) > 1 | public namespace Foo {} @@ -2526,6 +3290,12 @@ exports[`snippet: #107 format[typescript] 1`] = ` Cause: 'public' modifier cannot appear on a module or namespace element." `; +exports[`snippet: #107 format[yuku-ts] 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found 'namespace' (1:8) +> 1 | public namespace Foo {} + | ^^^^^^^^^" +`; + exports[`snippet: #108 format[babel-ts] 1`] = ` "Missing semicolon. (1:9) > 1 | readonly module Foo {} @@ -2546,6 +3316,12 @@ exports[`snippet: #108 format[typescript] 1`] = ` Cause: 'readonly' modifier can only appear on a property declaration or index signature." `; +exports[`snippet: #108 format[yuku-ts] 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found 'module' (1:10) +> 1 | readonly module Foo {} + | ^^^^^^" +`; + exports[`snippet: #109 format[babel-ts] 1`] = ` "Missing semicolon. (1:9) > 1 | readonly namespace Foo {} @@ -2566,6 +3342,12 @@ exports[`snippet: #109 format[typescript] 1`] = ` Cause: 'readonly' modifier can only appear on a property declaration or index signature." `; +exports[`snippet: #109 format[yuku-ts] 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found 'namespace' (1:10) +> 1 | readonly namespace Foo {} + | ^^^^^^^^^" +`; + exports[`snippet: #110 format[babel-ts] 1`] = ` "Missing semicolon. (1:7) > 1 | static module Foo {} @@ -2586,6 +3368,12 @@ exports[`snippet: #110 format[typescript] 1`] = ` Cause: 'static' modifier cannot appear on a module or namespace element." `; +exports[`snippet: #110 format[yuku-ts] 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found 'module' (1:8) +> 1 | static module Foo {} + | ^^^^^^" +`; + exports[`snippet: #111 format[babel-ts] 1`] = ` "Missing semicolon. (1:7) > 1 | static namespace Foo {} @@ -2606,6 +3394,12 @@ exports[`snippet: #111 format[typescript] 1`] = ` Cause: 'static' modifier cannot appear on a module or namespace element." `; +exports[`snippet: #111 format[yuku-ts] 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found 'namespace' (1:8) +> 1 | static namespace Foo {} + | ^^^^^^^^^" +`; + exports[`snippet: #112 format[babel-ts] 1`] = ` "Unexpected token, expected "class" (1:10) > 1 | abstract enum Foo {} @@ -2626,6 +3420,12 @@ exports[`snippet: #112 format[typescript] 1`] = ` Cause: 'abstract' modifier can only appear on a class, method, or property declaration." `; +exports[`snippet: #112 format[yuku-ts] 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found 'enum' (1:10) +> 1 | abstract enum Foo {} + | ^^^^" +`; + exports[`snippet: #113 format[babel-ts] 1`] = ` "Missing semicolon. (1:9) > 1 | accessor enum Foo {} @@ -2646,6 +3446,12 @@ exports[`snippet: #113 format[typescript] 1`] = ` Cause: 'accessor' modifier can only appear on a property declaration." `; +exports[`snippet: #113 format[yuku-ts] 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found 'enum' (1:10) +> 1 | accessor enum Foo {} + | ^^^^" +`; + exports[`snippet: #114 format[babel-ts] 1`] = ` "Missing semicolon. (1:6) > 1 | async enum Foo {} @@ -2666,6 +3472,12 @@ exports[`snippet: #114 format[typescript] 1`] = ` Cause: 'async' modifier cannot be used here." `; +exports[`snippet: #114 format[yuku-ts] 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found 'enum' (1:7) +> 1 | async enum Foo {} + | ^^^^" +`; + exports[`snippet: #115 format[babel-ts] 1`] = ` "Unexpected token (1:1) > 1 | default enum Foo {} @@ -2686,6 +3498,12 @@ exports[`snippet: #115 format[typescript] 1`] = ` Cause: 'export' expected." `; +exports[`snippet: #115 format[yuku-ts] 1`] = ` +"'default' is reserved and cannot be used as an identifier (1:1) +> 1 | default enum Foo {} + | ^^^^^^^" +`; + exports[`snippet: #116 format[babel-ts] 1`] = ` "Unexpected token (1:1) > 1 | in enum Foo {} @@ -2706,6 +3524,12 @@ exports[`snippet: #116 format[typescript] 1`] = ` Cause: Expression expected." `; +exports[`snippet: #116 format[yuku-ts] 1`] = ` +"'in' is reserved and cannot be used as an identifier (1:1) +> 1 | in enum Foo {} + | ^^" +`; + exports[`snippet: #117 format[babel-ts] 1`] = ` "Missing semicolon. (1:4) > 1 | out enum Foo {} @@ -2726,6 +3550,12 @@ exports[`snippet: #117 format[typescript] 1`] = ` Cause: Unexpected keyword or identifier." `; +exports[`snippet: #117 format[yuku-ts] 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found 'enum' (1:5) +> 1 | out enum Foo {} + | ^^^^" +`; + exports[`snippet: #118 format[babel-ts] 1`] = ` "Missing semicolon. (1:9) > 1 | override enum Foo {} @@ -2746,6 +3576,12 @@ exports[`snippet: #118 format[typescript] 1`] = ` Cause: Unexpected keyword or identifier." `; +exports[`snippet: #118 format[yuku-ts] 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found 'enum' (1:10) +> 1 | override enum Foo {} + | ^^^^" +`; + exports[`snippet: #119 format[babel-ts] 1`] = ` "Missing semicolon. (1:8) > 1 | private enum Foo {} @@ -2766,6 +3602,12 @@ exports[`snippet: #119 format[typescript] 1`] = ` Cause: 'private' modifier cannot appear on a module or namespace element." `; +exports[`snippet: #119 format[yuku-ts] 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found 'enum' (1:9) +> 1 | private enum Foo {} + | ^^^^" +`; + exports[`snippet: #120 format[babel-ts] 1`] = ` "Missing semicolon. (1:10) > 1 | protected enum Foo {} @@ -2786,6 +3628,12 @@ exports[`snippet: #120 format[typescript] 1`] = ` Cause: 'protected' modifier cannot appear on a module or namespace element." `; +exports[`snippet: #120 format[yuku-ts] 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found 'enum' (1:11) +> 1 | protected enum Foo {} + | ^^^^" +`; + exports[`snippet: #121 format[babel-ts] 1`] = ` "Missing semicolon. (1:7) > 1 | public enum Foo {} @@ -2806,6 +3654,12 @@ exports[`snippet: #121 format[typescript] 1`] = ` Cause: 'public' modifier cannot appear on a module or namespace element." `; +exports[`snippet: #121 format[yuku-ts] 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found 'enum' (1:8) +> 1 | public enum Foo {} + | ^^^^" +`; + exports[`snippet: #122 format[babel-ts] 1`] = ` "Missing semicolon. (1:9) > 1 | readonly enum Foo {} @@ -2826,6 +3680,12 @@ exports[`snippet: #122 format[typescript] 1`] = ` Cause: 'readonly' modifier can only appear on a property declaration or index signature." `; +exports[`snippet: #122 format[yuku-ts] 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found 'enum' (1:10) +> 1 | readonly enum Foo {} + | ^^^^" +`; + exports[`snippet: #123 format[babel-ts] 1`] = ` "Missing semicolon. (1:7) > 1 | static enum Foo {} @@ -2846,6 +3706,12 @@ exports[`snippet: #123 format[typescript] 1`] = ` Cause: 'static' modifier cannot appear on a module or namespace element." `; +exports[`snippet: #123 format[yuku-ts] 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found 'enum' (1:8) +> 1 | static enum Foo {} + | ^^^^" +`; + exports[`snippet: #124 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:23) > 1 | function foo(abstract parameter) {} @@ -2866,6 +3732,12 @@ exports[`snippet: #124 format[typescript] 1`] = ` Cause: 'abstract' modifier can only appear on a class, method, or property declaration." `; +exports[`snippet: #124 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found 'parameter' (1:23) +> 1 | function foo(abstract parameter) {} + | ^^^^^^^^^" +`; + exports[`snippet: #125 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:29) > 1 | class Foo { method(abstract parameter) {} } @@ -2886,6 +3758,12 @@ exports[`snippet: #125 format[typescript] 1`] = ` Cause: 'abstract' modifier can only appear on a class, method, or property declaration." `; +exports[`snippet: #125 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found 'parameter' (1:29) +> 1 | class Foo { method(abstract parameter) {} } + | ^^^^^^^^^" +`; + exports[`snippet: #126 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:23) > 1 | function foo(accessor parameter) {} @@ -2906,6 +3784,12 @@ exports[`snippet: #126 format[typescript] 1`] = ` Cause: 'accessor' modifier can only appear on a property declaration." `; +exports[`snippet: #126 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found 'parameter' (1:23) +> 1 | function foo(accessor parameter) {} + | ^^^^^^^^^" +`; + exports[`snippet: #127 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:29) > 1 | class Foo { method(accessor parameter) {} } @@ -2926,6 +3810,12 @@ exports[`snippet: #127 format[typescript] 1`] = ` Cause: 'accessor' modifier can only appear on a property declaration." `; +exports[`snippet: #127 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found 'parameter' (1:29) +> 1 | class Foo { method(accessor parameter) {} } + | ^^^^^^^^^" +`; + exports[`snippet: #128 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:20) > 1 | function foo(async parameter) {} @@ -2946,6 +3836,12 @@ exports[`snippet: #128 format[typescript] 1`] = ` Cause: 'async' modifier cannot be used here." `; +exports[`snippet: #128 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found 'parameter' (1:20) +> 1 | function foo(async parameter) {} + | ^^^^^^^^^" +`; + exports[`snippet: #129 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:26) > 1 | class Foo { method(async parameter) {} } @@ -2966,6 +3862,12 @@ exports[`snippet: #129 format[typescript] 1`] = ` Cause: 'async' modifier cannot be used here." `; +exports[`snippet: #129 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found 'parameter' (1:26) +> 1 | class Foo { method(async parameter) {} } + | ^^^^^^^^^" +`; + exports[`snippet: #130 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:20) > 1 | function foo(const parameter) {} @@ -2986,6 +3888,12 @@ exports[`snippet: #130 format[typescript] 1`] = ` Cause: Identifier expected. 'const' is a reserved word that cannot be used here." `; +exports[`snippet: #130 format[yuku-ts] 1`] = ` +"'const' is reserved and cannot be used as a binding identifier (1:14) +> 1 | function foo(const parameter) {} + | ^^^^^" +`; + exports[`snippet: #131 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:26) > 1 | class Foo { method(const parameter) {} } @@ -3006,6 +3914,12 @@ exports[`snippet: #131 format[typescript] 1`] = ` Cause: Identifier expected. 'const' is a reserved word that cannot be used here." `; +exports[`snippet: #131 format[yuku-ts] 1`] = ` +"'const' is reserved and cannot be used as a binding identifier (1:20) +> 1 | class Foo { method(const parameter) {} } + | ^^^^^" +`; + exports[`snippet: #132 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:22) > 1 | function foo(declare parameter) {} @@ -3026,6 +3940,12 @@ exports[`snippet: #132 format[typescript] 1`] = ` Cause: 'declare' modifier cannot appear on a parameter." `; +exports[`snippet: #132 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found 'parameter' (1:22) +> 1 | function foo(declare parameter) {} + | ^^^^^^^^^" +`; + exports[`snippet: #133 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:28) > 1 | class Foo { method(declare parameter) {} } @@ -3046,6 +3966,12 @@ exports[`snippet: #133 format[typescript] 1`] = ` Cause: 'declare' modifier cannot appear on a parameter." `; +exports[`snippet: #133 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found 'parameter' (1:28) +> 1 | class Foo { method(declare parameter) {} } + | ^^^^^^^^^" +`; + exports[`snippet: #134 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:22) > 1 | function foo(default parameter) {} @@ -3066,6 +3992,12 @@ exports[`snippet: #134 format[typescript] 1`] = ` Cause: Identifier expected. 'default' is a reserved word that cannot be used here." `; +exports[`snippet: #134 format[yuku-ts] 1`] = ` +"'default' is reserved and cannot be used as a binding identifier (1:14) +> 1 | function foo(default parameter) {} + | ^^^^^^^" +`; + exports[`snippet: #135 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:28) > 1 | class Foo { method(default parameter) {} } @@ -3086,6 +4018,12 @@ exports[`snippet: #135 format[typescript] 1`] = ` Cause: Identifier expected. 'default' is a reserved word that cannot be used here." `; +exports[`snippet: #135 format[yuku-ts] 1`] = ` +"'default' is reserved and cannot be used as a binding identifier (1:20) +> 1 | class Foo { method(default parameter) {} } + | ^^^^^^^" +`; + exports[`snippet: #136 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:21) > 1 | function foo(export parameter) {} @@ -3106,6 +4044,12 @@ exports[`snippet: #136 format[typescript] 1`] = ` Cause: 'export' modifier cannot appear on a parameter." `; +exports[`snippet: #136 format[yuku-ts] 1`] = ` +"'export' is reserved and cannot be used as a binding identifier (1:14) +> 1 | function foo(export parameter) {} + | ^^^^^^" +`; + exports[`snippet: #137 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:27) > 1 | class Foo { method(export parameter) {} } @@ -3126,6 +4070,12 @@ exports[`snippet: #137 format[typescript] 1`] = ` Cause: 'export' modifier cannot appear on a parameter." `; +exports[`snippet: #137 format[yuku-ts] 1`] = ` +"'export' is reserved and cannot be used as a binding identifier (1:20) +> 1 | class Foo { method(export parameter) {} } + | ^^^^^^" +`; + exports[`snippet: #138 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:17) > 1 | function foo(in parameter) {} @@ -3146,6 +4096,12 @@ exports[`snippet: #138 format[typescript] 1`] = ` Cause: 'in' modifier can only appear on a type parameter of a class, interface or type alias" `; +exports[`snippet: #138 format[yuku-ts] 1`] = ` +"'in' is reserved and cannot be used as a binding identifier (1:14) +> 1 | function foo(in parameter) {} + | ^^" +`; + exports[`snippet: #139 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:23) > 1 | class Foo { method(in parameter) {} } @@ -3166,6 +4122,12 @@ exports[`snippet: #139 format[typescript] 1`] = ` Cause: 'in' modifier can only appear on a type parameter of a class, interface or type alias" `; +exports[`snippet: #139 format[yuku-ts] 1`] = ` +"'in' is reserved and cannot be used as a binding identifier (1:20) +> 1 | class Foo { method(in parameter) {} } + | ^^" +`; + exports[`snippet: #140 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:18) > 1 | function foo(out parameter) {} @@ -3186,6 +4148,12 @@ exports[`snippet: #140 format[typescript] 1`] = ` Cause: 'out' modifier can only appear on a type parameter of a class, interface or type alias" `; +exports[`snippet: #140 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found 'parameter' (1:18) +> 1 | function foo(out parameter) {} + | ^^^^^^^^^" +`; + exports[`snippet: #141 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:24) > 1 | class Foo { method(out parameter) {} } @@ -3206,6 +4174,12 @@ exports[`snippet: #141 format[typescript] 1`] = ` Cause: 'out' modifier can only appear on a type parameter of a class, interface or type alias" `; +exports[`snippet: #141 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found 'parameter' (1:24) +> 1 | class Foo { method(out parameter) {} } + | ^^^^^^^^^" +`; + exports[`snippet: #142 format[babel-ts] 1`] = ` "A parameter property is only allowed in a constructor implementation. (1:14) > 1 | function foo(override parameter) {} @@ -3226,6 +4200,12 @@ exports[`snippet: #142 format[typescript] 1`] = ` Cause: A parameter property is only allowed in a constructor implementation." `; +exports[`snippet: #142 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found 'parameter' (1:23) +> 1 | function foo(override parameter) {} + | ^^^^^^^^^" +`; + exports[`snippet: #143 format[babel-ts] 1`] = ` "A parameter property is only allowed in a constructor implementation. (1:20) > 1 | class Foo { method(override parameter) {} } @@ -3246,6 +4226,12 @@ exports[`snippet: #143 format[typescript] 1`] = ` Cause: A parameter property is only allowed in a constructor implementation." `; +exports[`snippet: #143 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found 'parameter' (1:29) +> 1 | class Foo { method(override parameter) {} } + | ^^^^^^^^^" +`; + exports[`snippet: #144 format[babel-ts] 1`] = ` "A parameter property is only allowed in a constructor implementation. (1:14) > 1 | function foo(private parameter) {} @@ -3266,6 +4252,12 @@ exports[`snippet: #144 format[typescript] 1`] = ` Cause: A parameter property is only allowed in a constructor implementation." `; +exports[`snippet: #144 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found 'parameter' (1:22) +> 1 | function foo(private parameter) {} + | ^^^^^^^^^" +`; + exports[`snippet: #145 format[babel-ts] 1`] = ` "A parameter property is only allowed in a constructor implementation. (1:20) > 1 | class Foo { method(private parameter) {} } @@ -3286,6 +4278,12 @@ exports[`snippet: #145 format[typescript] 1`] = ` Cause: A parameter property is only allowed in a constructor implementation." `; +exports[`snippet: #145 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found 'parameter' (1:28) +> 1 | class Foo { method(private parameter) {} } + | ^^^^^^^^^" +`; + exports[`snippet: #146 format[babel-ts] 1`] = ` "A parameter property is only allowed in a constructor implementation. (1:14) > 1 | function foo(protected parameter) {} @@ -3306,6 +4304,12 @@ exports[`snippet: #146 format[typescript] 1`] = ` Cause: A parameter property is only allowed in a constructor implementation." `; +exports[`snippet: #146 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found 'parameter' (1:24) +> 1 | function foo(protected parameter) {} + | ^^^^^^^^^" +`; + exports[`snippet: #147 format[babel-ts] 1`] = ` "A parameter property is only allowed in a constructor implementation. (1:20) > 1 | class Foo { method(protected parameter) {} } @@ -3326,6 +4330,12 @@ exports[`snippet: #147 format[typescript] 1`] = ` Cause: A parameter property is only allowed in a constructor implementation." `; +exports[`snippet: #147 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found 'parameter' (1:30) +> 1 | class Foo { method(protected parameter) {} } + | ^^^^^^^^^" +`; + exports[`snippet: #148 format[babel-ts] 1`] = ` "A parameter property is only allowed in a constructor implementation. (1:14) > 1 | function foo(public parameter) {} @@ -3346,6 +4356,12 @@ exports[`snippet: #148 format[typescript] 1`] = ` Cause: A parameter property is only allowed in a constructor implementation." `; +exports[`snippet: #148 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found 'parameter' (1:21) +> 1 | function foo(public parameter) {} + | ^^^^^^^^^" +`; + exports[`snippet: #149 format[babel-ts] 1`] = ` "A parameter property is only allowed in a constructor implementation. (1:20) > 1 | class Foo { method(public parameter) {} } @@ -3366,6 +4382,12 @@ exports[`snippet: #149 format[typescript] 1`] = ` Cause: A parameter property is only allowed in a constructor implementation." `; +exports[`snippet: #149 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found 'parameter' (1:27) +> 1 | class Foo { method(public parameter) {} } + | ^^^^^^^^^" +`; + exports[`snippet: #150 format[babel-ts] 1`] = ` "A parameter property is only allowed in a constructor implementation. (1:14) > 1 | function foo(readonly parameter) {} @@ -3386,6 +4408,12 @@ exports[`snippet: #150 format[typescript] 1`] = ` Cause: A parameter property is only allowed in a constructor implementation." `; +exports[`snippet: #150 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found 'parameter' (1:23) +> 1 | function foo(readonly parameter) {} + | ^^^^^^^^^" +`; + exports[`snippet: #151 format[babel-ts] 1`] = ` "A parameter property is only allowed in a constructor implementation. (1:20) > 1 | class Foo { method(readonly parameter) {} } @@ -3406,6 +4434,12 @@ exports[`snippet: #151 format[typescript] 1`] = ` Cause: A parameter property is only allowed in a constructor implementation." `; +exports[`snippet: #151 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found 'parameter' (1:29) +> 1 | class Foo { method(readonly parameter) {} } + | ^^^^^^^^^" +`; + exports[`snippet: #152 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:21) > 1 | function foo(static parameter) {} @@ -3426,6 +4460,12 @@ exports[`snippet: #152 format[typescript] 1`] = ` Cause: 'static' modifier cannot appear on a parameter." `; +exports[`snippet: #152 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found 'parameter' (1:21) +> 1 | function foo(static parameter) {} + | ^^^^^^^^^" +`; + exports[`snippet: #153 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:27) > 1 | class Foo { method(static parameter) {} } @@ -3446,6 +4486,12 @@ exports[`snippet: #153 format[typescript] 1`] = ` Cause: 'static' modifier cannot appear on a parameter." `; +exports[`snippet: #153 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found 'parameter' (1:27) +> 1 | class Foo { method(static parameter) {} } + | ^^^^^^^^^" +`; + exports[`snippet: #154 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:34) > 1 | class Foo { constructor(abstract parameter) {} } @@ -3466,6 +4512,12 @@ exports[`snippet: #154 format[typescript] 1`] = ` Cause: 'abstract' modifier can only appear on a class, method, or property declaration." `; +exports[`snippet: #154 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found 'parameter' (1:34) +> 1 | class Foo { constructor(abstract parameter) {} } + | ^^^^^^^^^" +`; + exports[`snippet: #155 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:34) > 1 | class Foo { constructor(accessor parameter) {} } @@ -3486,6 +4538,12 @@ exports[`snippet: #155 format[typescript] 1`] = ` Cause: 'accessor' modifier can only appear on a property declaration." `; +exports[`snippet: #155 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found 'parameter' (1:34) +> 1 | class Foo { constructor(accessor parameter) {} } + | ^^^^^^^^^" +`; + exports[`snippet: #156 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:31) > 1 | class Foo { constructor(async parameter) {} } @@ -3506,6 +4564,12 @@ exports[`snippet: #156 format[typescript] 1`] = ` Cause: 'async' modifier cannot be used here." `; +exports[`snippet: #156 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found 'parameter' (1:31) +> 1 | class Foo { constructor(async parameter) {} } + | ^^^^^^^^^" +`; + exports[`snippet: #157 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:31) > 1 | class Foo { constructor(const parameter) {} } @@ -3526,6 +4590,12 @@ exports[`snippet: #157 format[typescript] 1`] = ` Cause: Identifier expected. 'const' is a reserved word that cannot be used here." `; +exports[`snippet: #157 format[yuku-ts] 1`] = ` +"'const' is reserved and cannot be used as a binding identifier (1:25) +> 1 | class Foo { constructor(const parameter) {} } + | ^^^^^" +`; + exports[`snippet: #158 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:33) > 1 | class Foo { constructor(declare parameter) {} } @@ -3546,6 +4616,12 @@ exports[`snippet: #158 format[typescript] 1`] = ` Cause: 'declare' modifier cannot appear on a parameter." `; +exports[`snippet: #158 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found 'parameter' (1:33) +> 1 | class Foo { constructor(declare parameter) {} } + | ^^^^^^^^^" +`; + exports[`snippet: #159 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:33) > 1 | class Foo { constructor(default parameter) {} } @@ -3566,6 +4642,12 @@ exports[`snippet: #159 format[typescript] 1`] = ` Cause: Identifier expected. 'default' is a reserved word that cannot be used here." `; +exports[`snippet: #159 format[yuku-ts] 1`] = ` +"'default' is reserved and cannot be used as a binding identifier (1:25) +> 1 | class Foo { constructor(default parameter) {} } + | ^^^^^^^" +`; + exports[`snippet: #160 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:32) > 1 | class Foo { constructor(export parameter) {} } @@ -3586,6 +4668,12 @@ exports[`snippet: #160 format[typescript] 1`] = ` Cause: 'export' modifier cannot appear on a parameter." `; +exports[`snippet: #160 format[yuku-ts] 1`] = ` +"'export' is reserved and cannot be used as a binding identifier (1:25) +> 1 | class Foo { constructor(export parameter) {} } + | ^^^^^^" +`; + exports[`snippet: #161 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:28) > 1 | class Foo { constructor(in parameter) {} } @@ -3606,6 +4694,12 @@ exports[`snippet: #161 format[typescript] 1`] = ` Cause: 'in' modifier can only appear on a type parameter of a class, interface or type alias" `; +exports[`snippet: #161 format[yuku-ts] 1`] = ` +"'in' is reserved and cannot be used as a binding identifier (1:25) +> 1 | class Foo { constructor(in parameter) {} } + | ^^" +`; + exports[`snippet: #162 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:29) > 1 | class Foo { constructor(out parameter) {} } @@ -3626,6 +4720,12 @@ exports[`snippet: #162 format[typescript] 1`] = ` Cause: 'out' modifier can only appear on a type parameter of a class, interface or type alias" `; +exports[`snippet: #162 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found 'parameter' (1:29) +> 1 | class Foo { constructor(out parameter) {} } + | ^^^^^^^^^" +`; + exports[`snippet: #163 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:32) > 1 | class Foo { constructor(static parameter) {} } @@ -3646,6 +4746,12 @@ exports[`snippet: #163 format[typescript] 1`] = ` Cause: 'static' modifier cannot appear on a parameter." `; +exports[`snippet: #163 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found 'parameter' (1:32) +> 1 | class Foo { constructor(static parameter) {} } + | ^^^^^^^^^" +`; + exports[`snippet: #164 format[babel-ts] 1`] = ` "A parameter property is only allowed in a constructor implementation. (1:28) > 1 | class Foo {["constructor"](private parameter) {}} @@ -3666,6 +4772,12 @@ exports[`snippet: #164 format[typescript] 1`] = ` Cause: A parameter property is only allowed in a constructor implementation." `; +exports[`snippet: #164 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found 'parameter' (1:36) +> 1 | class Foo {["constructor"](private parameter) {}} + | ^^^^^^^^^" +`; + exports[`snippet: #165 format[babel-ts] 1`] = ` "A parameter property is only allowed in a constructor implementation. (1:28) > 1 | class Foo {['constructor'](private parameter) {}} @@ -3686,6 +4798,12 @@ exports[`snippet: #165 format[typescript] 1`] = ` Cause: A parameter property is only allowed in a constructor implementation." `; +exports[`snippet: #165 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found 'parameter' (1:36) +> 1 | class Foo {['constructor'](private parameter) {}} + | ^^^^^^^^^" +`; + exports[`snippet: #166 format[babel-ts] 1`] = ` "A parameter property is only allowed in a constructor implementation. (1:28) > 1 | class Foo {[\`constructor\`](private parameter) {}} @@ -3706,6 +4824,12 @@ exports[`snippet: #166 format[typescript] 1`] = ` Cause: A parameter property is only allowed in a constructor implementation." `; +exports[`snippet: #166 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found 'parameter' (1:36) +> 1 | class Foo {[\`constructor\`](private parameter) {}} + | ^^^^^^^^^" +`; + exports[`snippet: #167 format[babel-ts] 1`] = ` "A parameter property is only allowed in a constructor implementation. (1:33) > 1 | class Foo {['construct' + 'or'](private parameter) {}} @@ -3726,6 +4850,12 @@ exports[`snippet: #167 format[typescript] 1`] = ` Cause: A parameter property is only allowed in a constructor implementation." `; +exports[`snippet: #167 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found 'parameter' (1:41) +> 1 | class Foo {['construct' + 'or'](private parameter) {}} + | ^^^^^^^^^" +`; + exports[`snippet: #168 format[babel-ts] 1`] = ` "'abstract' modifier cannot appear on a type member. (1:13) > 1 | type Foo = {abstract bar}; @@ -3746,6 +4876,12 @@ exports[`snippet: #168 format[typescript] 1`] = ` Cause: 'abstract' modifier cannot appear on a type member" `; +exports[`snippet: #168 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found 'bar' (1:22) +> 1 | type Foo = {abstract bar}; + | ^^^" +`; + exports[`snippet: #169 format[babel-ts] 1`] = ` "Unexpected token, expected ";" (1:22) > 1 | type Foo = {accessor bar}; @@ -3766,6 +4902,12 @@ exports[`snippet: #169 format[typescript] 1`] = ` Cause: 'accessor' modifier cannot appear on a type member" `; +exports[`snippet: #169 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found 'bar' (1:22) +> 1 | type Foo = {accessor bar}; + | ^^^" +`; + exports[`snippet: #170 format[babel-ts] 1`] = ` "Unexpected token, expected ";" (1:19) > 1 | type Foo = {async bar}; @@ -3786,6 +4928,12 @@ exports[`snippet: #170 format[typescript] 1`] = ` Cause: 'async' modifier cannot appear on a type member" `; +exports[`snippet: #170 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found 'bar' (1:19) +> 1 | type Foo = {async bar}; + | ^^^" +`; + exports[`snippet: #171 format[babel-ts] 1`] = ` "Unexpected token, expected ";" (1:19) > 1 | type Foo = {const bar}; @@ -3806,6 +4954,12 @@ exports[`snippet: #171 format[typescript] 1`] = ` Cause: ';' expected." `; +exports[`snippet: #171 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found 'bar' (1:19) +> 1 | type Foo = {const bar}; + | ^^^" +`; + exports[`snippet: #172 format[babel-ts] 1`] = ` "'declare' modifier cannot appear on a type member. (1:13) > 1 | type Foo = {declare bar}; @@ -3826,6 +4980,12 @@ exports[`snippet: #172 format[typescript] 1`] = ` Cause: 'declare' modifier cannot appear on a type member" `; +exports[`snippet: #172 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found 'bar' (1:21) +> 1 | type Foo = {declare bar}; + | ^^^" +`; + exports[`snippet: #173 format[babel-ts] 1`] = ` "Unexpected token, expected ";" (1:21) > 1 | type Foo = {default bar}; @@ -3846,6 +5006,12 @@ exports[`snippet: #173 format[typescript] 1`] = ` Cause: ';' expected." `; +exports[`snippet: #173 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found 'bar' (1:21) +> 1 | type Foo = {default bar}; + | ^^^" +`; + exports[`snippet: #174 format[babel-ts] 1`] = ` "Unexpected token, expected ";" (1:20) > 1 | type Foo = {export bar}; @@ -3866,6 +5032,12 @@ exports[`snippet: #174 format[typescript] 1`] = ` Cause: 'export' modifier cannot appear on a type member" `; +exports[`snippet: #174 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found 'bar' (1:20) +> 1 | type Foo = {export bar}; + | ^^^" +`; + exports[`snippet: #175 format[babel-ts] 1`] = ` "Unexpected token, expected ";" (1:16) > 1 | type Foo = {in bar}; @@ -3886,6 +5058,12 @@ exports[`snippet: #175 format[typescript] 1`] = ` Cause: 'in' modifier cannot appear on a type member" `; +exports[`snippet: #175 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found 'bar' (1:16) +> 1 | type Foo = {in bar}; + | ^^^" +`; + exports[`snippet: #176 format[babel-ts] 1`] = ` "Unexpected token, expected ";" (1:17) > 1 | type Foo = {out bar}; @@ -3906,6 +5084,12 @@ exports[`snippet: #176 format[typescript] 1`] = ` Cause: 'out' modifier cannot appear on a type member" `; +exports[`snippet: #176 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found 'bar' (1:17) +> 1 | type Foo = {out bar}; + | ^^^" +`; + exports[`snippet: #177 format[babel-ts] 1`] = ` "'override' modifier cannot appear on a type member. (1:13) > 1 | type Foo = {override bar}; @@ -3926,6 +5110,12 @@ exports[`snippet: #177 format[typescript] 1`] = ` Cause: 'override' modifier cannot appear on a type member" `; +exports[`snippet: #177 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found 'bar' (1:22) +> 1 | type Foo = {override bar}; + | ^^^" +`; + exports[`snippet: #178 format[babel-ts] 1`] = ` "'private' modifier cannot appear on a type member. (1:13) > 1 | type Foo = {private bar}; @@ -3946,6 +5136,12 @@ exports[`snippet: #178 format[typescript] 1`] = ` Cause: 'private' modifier cannot appear on a type member" `; +exports[`snippet: #178 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found 'bar' (1:21) +> 1 | type Foo = {private bar}; + | ^^^" +`; + exports[`snippet: #179 format[babel-ts] 1`] = ` "'protected' modifier cannot appear on a type member. (1:13) > 1 | type Foo = {protected bar}; @@ -3966,6 +5162,12 @@ exports[`snippet: #179 format[typescript] 1`] = ` Cause: 'protected' modifier cannot appear on a type member" `; +exports[`snippet: #179 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found 'bar' (1:23) +> 1 | type Foo = {protected bar}; + | ^^^" +`; + exports[`snippet: #180 format[babel-ts] 1`] = ` "'public' modifier cannot appear on a type member. (1:13) > 1 | type Foo = {public bar}; @@ -3986,6 +5188,12 @@ exports[`snippet: #180 format[typescript] 1`] = ` Cause: 'public' modifier cannot appear on a type member" `; +exports[`snippet: #180 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found 'bar' (1:20) +> 1 | type Foo = {public bar}; + | ^^^" +`; + exports[`snippet: #181 format[babel-ts] 1`] = ` "'static' modifier cannot appear on a type member. (1:13) > 1 | type Foo = {static bar}; @@ -4006,6 +5214,12 @@ exports[`snippet: #181 format[typescript] 1`] = ` Cause: 'static' modifier cannot appear on a type member" `; +exports[`snippet: #181 format[yuku-ts] 1`] = ` +"Expected ';', ',', or newline between type members, but found 'bar' (1:20) +> 1 | type Foo = {static bar}; + | ^^^" +`; + exports[`snippet: #182 format[babel-ts] 1`] = ` "Index signatures cannot have the 'declare' modifier. (2:3) 1 | class Foo { @@ -4032,6 +5246,14 @@ exports[`snippet: #182 format[typescript] 1`] = ` Cause: 'declare' modifier cannot appear on an index signature" `; +exports[`snippet: #182 format[yuku-ts] 1`] = ` +"Index signatures only accept 'readonly', 'static', and accessibility modifiers (2:3) + 1 | class Foo { +> 2 | declare [index: string]: number + | ^^^^^^^^^ + 3 | }" +`; + exports[`snippet: #183 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:12) > 1 | ({abstract method(){}}) @@ -4052,6 +5274,12 @@ exports[`snippet: #183 format[typescript] 1`] = ` Cause: 'abstract' modifier cannot be used here." `; +exports[`snippet: #183 format[yuku-ts] 1`] = ` +"Expected ',' or '}' in object, but found 'method' (1:12) +> 1 | ({abstract method(){}}) + | ^^^^^^" +`; + exports[`snippet: #184 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:12) > 1 | ({accessor method(){}}) @@ -4072,6 +5300,12 @@ exports[`snippet: #184 format[typescript] 1`] = ` Cause: 'accessor' modifier can only appear on a property declaration." `; +exports[`snippet: #184 format[yuku-ts] 1`] = ` +"Expected ',' or '}' in object, but found 'method' (1:12) +> 1 | ({accessor method(){}}) + | ^^^^^^" +`; + exports[`snippet: #185 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:9) > 1 | ({const method(){}}) @@ -4092,6 +5326,12 @@ exports[`snippet: #185 format[typescript] 1`] = ` Cause: ':' expected." `; +exports[`snippet: #185 format[yuku-ts] 1`] = ` +"'const' is reserved and cannot be used as an identifier (1:3) +> 1 | ({const method(){}}) + | ^^^^^" +`; + exports[`snippet: #186 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:11) > 1 | ({declare method(){}}) @@ -4112,6 +5352,12 @@ exports[`snippet: #186 format[typescript] 1`] = ` Cause: 'declare' modifier cannot be used here." `; +exports[`snippet: #186 format[yuku-ts] 1`] = ` +"Expected ',' or '}' in object, but found 'method' (1:11) +> 1 | ({declare method(){}}) + | ^^^^^^" +`; + exports[`snippet: #187 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:11) > 1 | ({default method(){}}) @@ -4132,6 +5378,12 @@ exports[`snippet: #187 format[typescript] 1`] = ` Cause: ':' expected." `; +exports[`snippet: #187 format[yuku-ts] 1`] = ` +"'default' is reserved and cannot be used as an identifier (1:3) +> 1 | ({default method(){}}) + | ^^^^^^^" +`; + exports[`snippet: #188 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:10) > 1 | ({export method(){}}) @@ -4152,6 +5404,12 @@ exports[`snippet: #188 format[typescript] 1`] = ` Cause: 'export' modifier cannot be used here." `; +exports[`snippet: #188 format[yuku-ts] 1`] = ` +"'export' is reserved and cannot be used as an identifier (1:3) +> 1 | ({export method(){}}) + | ^^^^^^" +`; + exports[`snippet: #189 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:6) > 1 | ({in method(){}}) @@ -4172,6 +5430,12 @@ exports[`snippet: #189 format[typescript] 1`] = ` Cause: 'in' modifier can only appear on a type parameter of a class, interface or type alias" `; +exports[`snippet: #189 format[yuku-ts] 1`] = ` +"'in' is reserved and cannot be used as an identifier (1:3) +> 1 | ({in method(){}}) + | ^^" +`; + exports[`snippet: #190 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:7) > 1 | ({out method(){}}) @@ -4192,6 +5456,12 @@ exports[`snippet: #190 format[typescript] 1`] = ` Cause: 'out' modifier can only appear on a type parameter of a class, interface or type alias" `; +exports[`snippet: #190 format[yuku-ts] 1`] = ` +"Expected ',' or '}' in object, but found 'method' (1:7) +> 1 | ({out method(){}}) + | ^^^^^^" +`; + exports[`snippet: #191 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:12) > 1 | ({override method(){}}) @@ -4212,6 +5482,12 @@ exports[`snippet: #191 format[typescript] 1`] = ` Cause: 'override' modifier cannot be used here." `; +exports[`snippet: #191 format[yuku-ts] 1`] = ` +"Expected ',' or '}' in object, but found 'method' (1:12) +> 1 | ({override method(){}}) + | ^^^^^^" +`; + exports[`snippet: #192 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:11) > 1 | ({private method(){}}) @@ -4232,6 +5508,12 @@ exports[`snippet: #192 format[typescript] 1`] = ` Cause: 'private' modifier cannot be used here." `; +exports[`snippet: #192 format[yuku-ts] 1`] = ` +"Expected ',' or '}' in object, but found 'method' (1:11) +> 1 | ({private method(){}}) + | ^^^^^^" +`; + exports[`snippet: #193 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:13) > 1 | ({protected method(){}}) @@ -4252,6 +5534,12 @@ exports[`snippet: #193 format[typescript] 1`] = ` Cause: 'protected' modifier cannot be used here." `; +exports[`snippet: #193 format[yuku-ts] 1`] = ` +"Expected ',' or '}' in object, but found 'method' (1:13) +> 1 | ({protected method(){}}) + | ^^^^^^" +`; + exports[`snippet: #194 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:10) > 1 | ({public method(){}}) @@ -4272,6 +5560,12 @@ exports[`snippet: #194 format[typescript] 1`] = ` Cause: 'public' modifier cannot be used here." `; +exports[`snippet: #194 format[yuku-ts] 1`] = ` +"Expected ',' or '}' in object, but found 'method' (1:10) +> 1 | ({public method(){}}) + | ^^^^^^" +`; + exports[`snippet: #195 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:12) > 1 | ({readonly method(){}}) @@ -4292,6 +5586,12 @@ exports[`snippet: #195 format[typescript] 1`] = ` Cause: 'readonly' modifier can only appear on a property declaration or index signature." `; +exports[`snippet: #195 format[yuku-ts] 1`] = ` +"Expected ',' or '}' in object, but found 'method' (1:12) +> 1 | ({readonly method(){}}) + | ^^^^^^" +`; + exports[`snippet: #196 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:10) > 1 | ({static method(){}}) @@ -4312,6 +5612,12 @@ exports[`snippet: #196 format[typescript] 1`] = ` Cause: 'static' modifier cannot be used here." `; +exports[`snippet: #196 format[yuku-ts] 1`] = ` +"Expected ',' or '}' in object, but found 'method' (1:10) +> 1 | ({static method(){}}) + | ^^^^^^" +`; + exports[`snippet: #197 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:31) > 1 | class A {constructor(abstract []){}} @@ -4332,6 +5638,12 @@ exports[`snippet: #197 format[typescript] 1`] = ` Cause: 'abstract' modifier can only appear on a class, method, or property declaration." `; +exports[`snippet: #197 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found '[' (1:31) +> 1 | class A {constructor(abstract []){}} + | ^" +`; + exports[`snippet: #198 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:31) > 1 | class A {constructor(abstract {}){}} @@ -4352,6 +5664,12 @@ exports[`snippet: #198 format[typescript] 1`] = ` Cause: 'abstract' modifier can only appear on a class, method, or property declaration." `; +exports[`snippet: #198 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found '{' (1:31) +> 1 | class A {constructor(abstract {}){}} + | ^" +`; + exports[`snippet: #199 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:31) > 1 | class A {constructor(abstract ...a){}} @@ -4372,6 +5690,12 @@ exports[`snippet: #199 format[typescript] 1`] = ` Cause: 'abstract' modifier can only appear on a class, method, or property declaration." `; +exports[`snippet: #199 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found '...' (1:31) +> 1 | class A {constructor(abstract ...a){}} + | ^^^" +`; + exports[`snippet: #200 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:31) > 1 | class A {constructor(accessor []){}} @@ -4392,6 +5716,12 @@ exports[`snippet: #200 format[typescript] 1`] = ` Cause: 'accessor' modifier can only appear on a property declaration." `; +exports[`snippet: #200 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found '[' (1:31) +> 1 | class A {constructor(accessor []){}} + | ^" +`; + exports[`snippet: #201 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:31) > 1 | class A {constructor(accessor {}){}} @@ -4412,6 +5742,12 @@ exports[`snippet: #201 format[typescript] 1`] = ` Cause: 'accessor' modifier can only appear on a property declaration." `; +exports[`snippet: #201 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found '{' (1:31) +> 1 | class A {constructor(accessor {}){}} + | ^" +`; + exports[`snippet: #202 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:31) > 1 | class A {constructor(accessor ...a){}} @@ -4432,6 +5768,12 @@ exports[`snippet: #202 format[typescript] 1`] = ` Cause: 'accessor' modifier can only appear on a property declaration." `; +exports[`snippet: #202 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found '...' (1:31) +> 1 | class A {constructor(accessor ...a){}} + | ^^^" +`; + exports[`snippet: #203 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:28) > 1 | class A {constructor(async []){}} @@ -4452,6 +5794,12 @@ exports[`snippet: #203 format[typescript] 1`] = ` Cause: 'async' modifier cannot be used here." `; +exports[`snippet: #203 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found '[' (1:28) +> 1 | class A {constructor(async []){}} + | ^" +`; + exports[`snippet: #204 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:28) > 1 | class A {constructor(async {}){}} @@ -4472,6 +5820,12 @@ exports[`snippet: #204 format[typescript] 1`] = ` Cause: 'async' modifier cannot be used here." `; +exports[`snippet: #204 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found '{' (1:28) +> 1 | class A {constructor(async {}){}} + | ^" +`; + exports[`snippet: #205 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:28) > 1 | class A {constructor(async ...a){}} @@ -4492,6 +5846,12 @@ exports[`snippet: #205 format[typescript] 1`] = ` Cause: 'async' modifier cannot be used here." `; +exports[`snippet: #205 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found '...' (1:28) +> 1 | class A {constructor(async ...a){}} + | ^^^" +`; + exports[`snippet: #206 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:28) > 1 | class A {constructor(const []){}} @@ -4512,6 +5872,12 @@ exports[`snippet: #206 format[typescript] 1`] = ` Cause: Identifier expected. 'const' is a reserved word that cannot be used here." `; +exports[`snippet: #206 format[yuku-ts] 1`] = ` +"'const' is reserved and cannot be used as a binding identifier (1:22) +> 1 | class A {constructor(const []){}} + | ^^^^^" +`; + exports[`snippet: #207 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:28) > 1 | class A {constructor(const {}){}} @@ -4532,6 +5898,12 @@ exports[`snippet: #207 format[typescript] 1`] = ` Cause: Identifier expected. 'const' is a reserved word that cannot be used here." `; +exports[`snippet: #207 format[yuku-ts] 1`] = ` +"'const' is reserved and cannot be used as a binding identifier (1:22) +> 1 | class A {constructor(const {}){}} + | ^^^^^" +`; + exports[`snippet: #208 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:28) > 1 | class A {constructor(const ...a){}} @@ -4552,6 +5924,12 @@ exports[`snippet: #208 format[typescript] 1`] = ` Cause: Identifier expected. 'const' is a reserved word that cannot be used here." `; +exports[`snippet: #208 format[yuku-ts] 1`] = ` +"'const' is reserved and cannot be used as a binding identifier (1:22) +> 1 | class A {constructor(const ...a){}} + | ^^^^^" +`; + exports[`snippet: #209 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:30) > 1 | class A {constructor(declare []){}} @@ -4572,6 +5950,12 @@ exports[`snippet: #209 format[typescript] 1`] = ` Cause: 'declare' modifier cannot appear on a parameter." `; +exports[`snippet: #209 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found '[' (1:30) +> 1 | class A {constructor(declare []){}} + | ^" +`; + exports[`snippet: #210 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:30) > 1 | class A {constructor(declare {}){}} @@ -4592,6 +5976,12 @@ exports[`snippet: #210 format[typescript] 1`] = ` Cause: 'declare' modifier cannot appear on a parameter." `; +exports[`snippet: #210 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found '{' (1:30) +> 1 | class A {constructor(declare {}){}} + | ^" +`; + exports[`snippet: #211 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:30) > 1 | class A {constructor(declare ...a){}} @@ -4612,6 +6002,12 @@ exports[`snippet: #211 format[typescript] 1`] = ` Cause: 'declare' modifier cannot appear on a parameter." `; +exports[`snippet: #211 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found '...' (1:30) +> 1 | class A {constructor(declare ...a){}} + | ^^^" +`; + exports[`snippet: #212 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:30) > 1 | class A {constructor(default []){}} @@ -4632,6 +6028,12 @@ exports[`snippet: #212 format[typescript] 1`] = ` Cause: Identifier expected. 'default' is a reserved word that cannot be used here." `; +exports[`snippet: #212 format[yuku-ts] 1`] = ` +"'default' is reserved and cannot be used as a binding identifier (1:22) +> 1 | class A {constructor(default []){}} + | ^^^^^^^" +`; + exports[`snippet: #213 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:30) > 1 | class A {constructor(default {}){}} @@ -4652,6 +6054,12 @@ exports[`snippet: #213 format[typescript] 1`] = ` Cause: Identifier expected. 'default' is a reserved word that cannot be used here." `; +exports[`snippet: #213 format[yuku-ts] 1`] = ` +"'default' is reserved and cannot be used as a binding identifier (1:22) +> 1 | class A {constructor(default {}){}} + | ^^^^^^^" +`; + exports[`snippet: #214 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:30) > 1 | class A {constructor(default ...a){}} @@ -4672,6 +6080,12 @@ exports[`snippet: #214 format[typescript] 1`] = ` Cause: Identifier expected. 'default' is a reserved word that cannot be used here." `; +exports[`snippet: #214 format[yuku-ts] 1`] = ` +"'default' is reserved and cannot be used as a binding identifier (1:22) +> 1 | class A {constructor(default ...a){}} + | ^^^^^^^" +`; + exports[`snippet: #215 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:29) > 1 | class A {constructor(export []){}} @@ -4692,6 +6106,12 @@ exports[`snippet: #215 format[typescript] 1`] = ` Cause: 'export' modifier cannot appear on a parameter." `; +exports[`snippet: #215 format[yuku-ts] 1`] = ` +"'export' is reserved and cannot be used as a binding identifier (1:22) +> 1 | class A {constructor(export []){}} + | ^^^^^^" +`; + exports[`snippet: #216 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:29) > 1 | class A {constructor(export {}){}} @@ -4712,6 +6132,12 @@ exports[`snippet: #216 format[typescript] 1`] = ` Cause: Identifier expected. 'export' is a reserved word that cannot be used here." `; +exports[`snippet: #216 format[yuku-ts] 1`] = ` +"'export' is reserved and cannot be used as a binding identifier (1:22) +> 1 | class A {constructor(export {}){}} + | ^^^^^^" +`; + exports[`snippet: #217 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:29) > 1 | class A {constructor(export ...a){}} @@ -4732,6 +6158,12 @@ exports[`snippet: #217 format[typescript] 1`] = ` Cause: 'export' modifier cannot appear on a parameter." `; +exports[`snippet: #217 format[yuku-ts] 1`] = ` +"'export' is reserved and cannot be used as a binding identifier (1:22) +> 1 | class A {constructor(export ...a){}} + | ^^^^^^" +`; + exports[`snippet: #218 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:25) > 1 | class A {constructor(in []){}} @@ -4752,6 +6184,12 @@ exports[`snippet: #218 format[typescript] 1`] = ` Cause: 'in' modifier can only appear on a type parameter of a class, interface or type alias" `; +exports[`snippet: #218 format[yuku-ts] 1`] = ` +"'in' is reserved and cannot be used as a binding identifier (1:22) +> 1 | class A {constructor(in []){}} + | ^^" +`; + exports[`snippet: #219 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:25) > 1 | class A {constructor(in {}){}} @@ -4772,6 +6210,12 @@ exports[`snippet: #219 format[typescript] 1`] = ` Cause: 'in' modifier can only appear on a type parameter of a class, interface or type alias" `; +exports[`snippet: #219 format[yuku-ts] 1`] = ` +"'in' is reserved and cannot be used as a binding identifier (1:22) +> 1 | class A {constructor(in {}){}} + | ^^" +`; + exports[`snippet: #220 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:25) > 1 | class A {constructor(in ...a){}} @@ -4792,6 +6236,12 @@ exports[`snippet: #220 format[typescript] 1`] = ` Cause: 'in' modifier can only appear on a type parameter of a class, interface or type alias" `; +exports[`snippet: #220 format[yuku-ts] 1`] = ` +"'in' is reserved and cannot be used as a binding identifier (1:22) +> 1 | class A {constructor(in ...a){}} + | ^^" +`; + exports[`snippet: #221 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:26) > 1 | class A {constructor(out []){}} @@ -4812,6 +6262,12 @@ exports[`snippet: #221 format[typescript] 1`] = ` Cause: 'out' modifier can only appear on a type parameter of a class, interface or type alias" `; +exports[`snippet: #221 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found '[' (1:26) +> 1 | class A {constructor(out []){}} + | ^" +`; + exports[`snippet: #222 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:26) > 1 | class A {constructor(out {}){}} @@ -4832,6 +6288,12 @@ exports[`snippet: #222 format[typescript] 1`] = ` Cause: 'out' modifier can only appear on a type parameter of a class, interface or type alias" `; +exports[`snippet: #222 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found '{' (1:26) +> 1 | class A {constructor(out {}){}} + | ^" +`; + exports[`snippet: #223 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:26) > 1 | class A {constructor(out ...a){}} @@ -4852,6 +6314,12 @@ exports[`snippet: #223 format[typescript] 1`] = ` Cause: 'out' modifier can only appear on a type parameter of a class, interface or type alias" `; +exports[`snippet: #223 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found '...' (1:26) +> 1 | class A {constructor(out ...a){}} + | ^^^" +`; + exports[`snippet: #224 format[babel-ts] 1`] = ` "A parameter property may not be declared using a binding pattern. (1:22) > 1 | class A {constructor(override []){}} @@ -4872,6 +6340,12 @@ exports[`snippet: #224 format[typescript] 1`] = ` Cause: A parameter property may not be declared using a binding pattern." `; +exports[`snippet: #224 format[yuku-ts] 1`] = ` +"A parameter property may not be declared using a binding pattern (1:31) +> 1 | class A {constructor(override []){}} + | ^^" +`; + exports[`snippet: #225 format[babel-ts] 1`] = ` "A parameter property may not be declared using a binding pattern. (1:22) > 1 | class A {constructor(override {}){}} @@ -4892,6 +6366,12 @@ exports[`snippet: #225 format[typescript] 1`] = ` Cause: A parameter property may not be declared using a binding pattern." `; +exports[`snippet: #225 format[yuku-ts] 1`] = ` +"A parameter property may not be declared using a binding pattern (1:31) +> 1 | class A {constructor(override {}){}} + | ^^" +`; + exports[`snippet: #226 format[babel-ts] 1`] = ` "Unexpected token (1:31) > 1 | class A {constructor(override ...a){}} @@ -4912,6 +6392,12 @@ exports[`snippet: #226 format[typescript] 1`] = ` Cause: A parameter property cannot be a rest parameter." `; +exports[`snippet: #226 format[yuku-ts] 1`] = ` +"Unexpected token '...' in binding pattern (1:31) +> 1 | class A {constructor(override ...a){}} + | ^^^" +`; + exports[`snippet: #227 format[babel-ts] 1`] = ` "A parameter property may not be declared using a binding pattern. (1:22) > 1 | class A {constructor(private []){}} @@ -4932,6 +6418,12 @@ exports[`snippet: #227 format[typescript] 1`] = ` Cause: A parameter property may not be declared using a binding pattern." `; +exports[`snippet: #227 format[yuku-ts] 1`] = ` +"A parameter property may not be declared using a binding pattern (1:30) +> 1 | class A {constructor(private []){}} + | ^^" +`; + exports[`snippet: #228 format[babel-ts] 1`] = ` "A parameter property may not be declared using a binding pattern. (1:22) > 1 | class A {constructor(private {}){}} @@ -4952,6 +6444,12 @@ exports[`snippet: #228 format[typescript] 1`] = ` Cause: A parameter property may not be declared using a binding pattern." `; +exports[`snippet: #228 format[yuku-ts] 1`] = ` +"A parameter property may not be declared using a binding pattern (1:30) +> 1 | class A {constructor(private {}){}} + | ^^" +`; + exports[`snippet: #229 format[babel-ts] 1`] = ` "Unexpected token (1:30) > 1 | class A {constructor(private ...a){}} @@ -4972,6 +6470,12 @@ exports[`snippet: #229 format[typescript] 1`] = ` Cause: A parameter property cannot be a rest parameter." `; +exports[`snippet: #229 format[yuku-ts] 1`] = ` +"Unexpected token '...' in binding pattern (1:30) +> 1 | class A {constructor(private ...a){}} + | ^^^" +`; + exports[`snippet: #230 format[babel-ts] 1`] = ` "A parameter property may not be declared using a binding pattern. (1:22) > 1 | class A {constructor(protected []){}} @@ -4992,6 +6496,12 @@ exports[`snippet: #230 format[typescript] 1`] = ` Cause: A parameter property may not be declared using a binding pattern." `; +exports[`snippet: #230 format[yuku-ts] 1`] = ` +"A parameter property may not be declared using a binding pattern (1:32) +> 1 | class A {constructor(protected []){}} + | ^^" +`; + exports[`snippet: #231 format[babel-ts] 1`] = ` "A parameter property may not be declared using a binding pattern. (1:22) > 1 | class A {constructor(protected {}){}} @@ -5012,6 +6522,12 @@ exports[`snippet: #231 format[typescript] 1`] = ` Cause: A parameter property may not be declared using a binding pattern." `; +exports[`snippet: #231 format[yuku-ts] 1`] = ` +"A parameter property may not be declared using a binding pattern (1:32) +> 1 | class A {constructor(protected {}){}} + | ^^" +`; + exports[`snippet: #232 format[babel-ts] 1`] = ` "Unexpected token (1:32) > 1 | class A {constructor(protected ...a){}} @@ -5032,6 +6548,12 @@ exports[`snippet: #232 format[typescript] 1`] = ` Cause: A parameter property cannot be a rest parameter." `; +exports[`snippet: #232 format[yuku-ts] 1`] = ` +"Unexpected token '...' in binding pattern (1:32) +> 1 | class A {constructor(protected ...a){}} + | ^^^" +`; + exports[`snippet: #233 format[babel-ts] 1`] = ` "A parameter property may not be declared using a binding pattern. (1:22) > 1 | class A {constructor(public []){}} @@ -5052,6 +6574,12 @@ exports[`snippet: #233 format[typescript] 1`] = ` Cause: A parameter property may not be declared using a binding pattern." `; +exports[`snippet: #233 format[yuku-ts] 1`] = ` +"A parameter property may not be declared using a binding pattern (1:29) +> 1 | class A {constructor(public []){}} + | ^^" +`; + exports[`snippet: #234 format[babel-ts] 1`] = ` "A parameter property may not be declared using a binding pattern. (1:22) > 1 | class A {constructor(public {}){}} @@ -5072,6 +6600,12 @@ exports[`snippet: #234 format[typescript] 1`] = ` Cause: A parameter property may not be declared using a binding pattern." `; +exports[`snippet: #234 format[yuku-ts] 1`] = ` +"A parameter property may not be declared using a binding pattern (1:29) +> 1 | class A {constructor(public {}){}} + | ^^" +`; + exports[`snippet: #235 format[babel-ts] 1`] = ` "Unexpected token (1:29) > 1 | class A {constructor(public ...a){}} @@ -5092,6 +6626,12 @@ exports[`snippet: #235 format[typescript] 1`] = ` Cause: A parameter property cannot be a rest parameter." `; +exports[`snippet: #235 format[yuku-ts] 1`] = ` +"Unexpected token '...' in binding pattern (1:29) +> 1 | class A {constructor(public ...a){}} + | ^^^" +`; + exports[`snippet: #236 format[babel-ts] 1`] = ` "A parameter property may not be declared using a binding pattern. (1:22) > 1 | class A {constructor(readonly []){}} @@ -5112,6 +6652,12 @@ exports[`snippet: #236 format[typescript] 1`] = ` Cause: A parameter property may not be declared using a binding pattern." `; +exports[`snippet: #236 format[yuku-ts] 1`] = ` +"A parameter property may not be declared using a binding pattern (1:31) +> 1 | class A {constructor(readonly []){}} + | ^^" +`; + exports[`snippet: #237 format[babel-ts] 1`] = ` "A parameter property may not be declared using a binding pattern. (1:22) > 1 | class A {constructor(readonly {}){}} @@ -5132,6 +6678,12 @@ exports[`snippet: #237 format[typescript] 1`] = ` Cause: A parameter property may not be declared using a binding pattern." `; +exports[`snippet: #237 format[yuku-ts] 1`] = ` +"A parameter property may not be declared using a binding pattern (1:31) +> 1 | class A {constructor(readonly {}){}} + | ^^" +`; + exports[`snippet: #238 format[babel-ts] 1`] = ` "Unexpected token (1:31) > 1 | class A {constructor(readonly ...a){}} @@ -5152,6 +6704,12 @@ exports[`snippet: #238 format[typescript] 1`] = ` Cause: A parameter property cannot be a rest parameter." `; +exports[`snippet: #238 format[yuku-ts] 1`] = ` +"Unexpected token '...' in binding pattern (1:31) +> 1 | class A {constructor(readonly ...a){}} + | ^^^" +`; + exports[`snippet: #239 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:29) > 1 | class A {constructor(static []){}} @@ -5172,6 +6730,12 @@ exports[`snippet: #239 format[typescript] 1`] = ` Cause: 'static' modifier cannot appear on a parameter." `; +exports[`snippet: #239 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found '[' (1:29) +> 1 | class A {constructor(static []){}} + | ^" +`; + exports[`snippet: #240 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:29) > 1 | class A {constructor(static {}){}} @@ -5192,6 +6756,12 @@ exports[`snippet: #240 format[typescript] 1`] = ` Cause: 'static' modifier cannot appear on a parameter." `; +exports[`snippet: #240 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found '{' (1:29) +> 1 | class A {constructor(static {}){}} + | ^" +`; + exports[`snippet: #241 format[babel-ts] 1`] = ` "Unexpected token, expected "," (1:29) > 1 | class A {constructor(static ...a){}} @@ -5211,3 +6781,9 @@ exports[`snippet: #241 format[typescript] 1`] = ` | ^^^^^^ Cause: 'static' modifier cannot appear on a parameter." `; + +exports[`snippet: #241 format[yuku-ts] 1`] = ` +"Expected ')' to close parameter list, but found '...' (1:29) +> 1 | class A {constructor(static ...a){}} + | ^^^" +`; diff --git a/tests/format/typescript/_errors_/modifiers/format.test.js b/tests/format/typescript/_errors_/modifiers/format.test.js index bf05c81af..f4024fe3e 100644 --- a/tests/format/typescript/_errors_/modifiers/format.test.js +++ b/tests/format/typescript/_errors_/modifiers/format.test.js @@ -152,5 +152,5 @@ runFormatTest( ]), ], }, - ["typescript", "babel-ts", "oxc-ts"], + ["typescript", "babel-ts", "oxc-ts", "yuku-ts"], ); diff --git a/tests/format/typescript/_errors_/module-declaration/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/module-declaration/__snapshots__/format.test.js.snap index 1500ca648..7b0ea329c 100644 --- a/tests/format/typescript/_errors_/module-declaration/__snapshots__/format.test.js.snap +++ b/tests/format/typescript/_errors_/module-declaration/__snapshots__/format.test.js.snap @@ -20,6 +20,12 @@ exports[`snippet: #0 format[typescript] 1`] = ` Cause: Identifier expected." `; +exports[`snippet: #0 format[yuku-ts] 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found '"a"' (1:11) +> 1 | namespace "a" {} + | ^^^" +`; + exports[`snippet: #1 format[babel-ts] 1`] = ` "Missing semicolon. (1:10) > 1 | namespace "a"; @@ -40,6 +46,12 @@ exports[`snippet: #1 format[typescript] 1`] = ` Cause: Identifier expected." `; +exports[`snippet: #1 format[yuku-ts] 1`] = ` +"Expected a semicolon or an implicit semicolon after a statement, but found '"a"' (1:11) +> 1 | namespace "a"; + | ^^^" +`; + exports[`snippet: #2 format[babel-ts] 1`] = ` "Unexpected token, expected "{" (1:12) > 1 | namespace a; @@ -59,3 +71,9 @@ exports[`snippet: #2 format[typescript] 1`] = ` | ^ Cause: '{' expected." `; + +exports[`snippet: #2 format[yuku-ts] 1`] = ` +"A namespace declaration requires a body (1:1) +> 1 | namespace a; + | ^^^^^^^^^^^" +`; diff --git a/tests/format/typescript/_errors_/module-declaration/format.test.js b/tests/format/typescript/_errors_/module-declaration/format.test.js index c5ee6d3c3..bd3532527 100644 --- a/tests/format/typescript/_errors_/module-declaration/format.test.js +++ b/tests/format/typescript/_errors_/module-declaration/format.test.js @@ -3,5 +3,5 @@ runFormatTest( importMeta: import.meta, snippets: ['namespace "a" {}', 'namespace "a";', "namespace a;"], }, - ["typescript", "babel-ts", "oxc-ts"], + ["typescript", "babel-ts", "oxc-ts", "yuku-ts"], ); diff --git a/tests/format/typescript/_errors_/tuple/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/tuple/__snapshots__/format.test.js.snap index 01f959b6f..fdfe76d11 100644 --- a/tests/format/typescript/_errors_/tuple/__snapshots__/format.test.js.snap +++ b/tests/format/typescript/_errors_/tuple/__snapshots__/format.test.js.snap @@ -1,12 +1,5 @@ // Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing -exports[`snippet: #0 format 1`] = ` -"Type parameters cannot appear on a constructor declaration. (1:24) -> 1 | class A { 'constructor'() {} } - | ^ -Cause: Type parameters cannot appear on a constructor declaration. (1:23)" -`; - exports[`snippet: #0 format[babel-ts] 1`] = ` "Tuple members must be labeled with a simple identifier. (1:11) > 1 | type T = [x.y: A]; @@ -21,6 +14,13 @@ exports[`snippet: #0 format[babel-ts] 2`] = ` Cause: A required element cannot follow an optional element. (1:17)" `; +exports[`snippet: #0 format[babel-ts] 3`] = ` +"Type parameters cannot appear on a constructor declaration. (1:24) +> 1 | class A { 'constructor'() {} } + | ^ +Cause: Type parameters cannot appear on a constructor declaration. (1:23)" +`; + exports[`snippet: #0 format[oxc-ts] 1`] = ` "Expected \`,\` or \`]\` but found \`:\` (1:14) > 1 | type T = [x.y: A]; @@ -40,6 +40,24 @@ exports[`snippet: #0 format[typescript] 1`] = ` Cause: ',' expected." `; +exports[`snippet: #0 format[yuku-ts] 1`] = ` +"Expected ']' to close a tuple type, but found ':' (1:14) +> 1 | type T = [x.y: A]; + | ^" +`; + +exports[`snippet: #0 format[yuku-ts] 2`] = ` +"A required element cannot follow an optional element (1:18) +> 1 | type T = [x?: A, y: B]; + | ^^^^" +`; + +exports[`snippet: #0 format[yuku-ts] 3`] = ` +"Type parameters cannot appear on a constructor declaration (1:24) +> 1 | class A { 'constructor'() {} } + | ^^^" +`; + exports[`snippet: #1 format[babel-ts] 1`] = ` "Tuple members must be labeled with a simple identifier. (1:11) > 1 | type T = [x: A]; @@ -72,3 +90,15 @@ exports[`snippet: #1 format[typescript] 1`] = ` | ^ Cause: ',' expected." `; + +exports[`snippet: #1 format[yuku-ts] 1`] = ` +"Expected ']' to close a tuple type, but found ':' (1:15) +> 1 | type T = [x: A]; + | ^" +`; + +exports[`snippet: #1 format[yuku-ts] 2`] = ` +"Type parameters cannot appear on a constructor declaration (1:22) +> 1 | class A { constructor() {} } + | ^^^" +`; diff --git a/tests/format/typescript/_errors_/tuple/format.test.js b/tests/format/typescript/_errors_/tuple/format.test.js index c9b054812..c8dbe1269 100644 --- a/tests/format/typescript/_errors_/tuple/format.test.js +++ b/tests/format/typescript/_errors_/tuple/format.test.js @@ -8,7 +8,7 @@ runFormatTest( "type T = [x: A];", ], }, - ["typescript", "babel-ts", "oxc-ts"], + ["typescript", "babel-ts", "oxc-ts", "yuku-ts"], ); runFormatTest( @@ -25,6 +25,7 @@ runFormatTest( // "typescript", "babel-ts", "oxc-ts", + "yuku-ts", ], ); @@ -40,5 +41,6 @@ runFormatTest( // "typescript", "babel-ts", // "oxc-ts", + "yuku-ts", ], ); diff --git a/tests/format/typescript/_errors_/type-only-import/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/type-only-import/__snapshots__/format.test.js.snap index 940464ec3..6d247b8ed 100644 --- a/tests/format/typescript/_errors_/type-only-import/__snapshots__/format.test.js.snap +++ b/tests/format/typescript/_errors_/type-only-import/__snapshots__/format.test.js.snap @@ -33,6 +33,18 @@ exports[`snippet: #0 format[typescript] 2`] = ` Cause: A type-only import can specify a default import or named bindings, but not both." `; +exports[`snippet: #0 format[yuku-ts] 1`] = ` +"A type-only import can specify a default import or named bindings, but not both (1:13) +> 1 | import type foo, {} from "foo" + | ^^^^^^^" +`; + +exports[`snippet: #0 format[yuku-ts] 2`] = ` +"A type-only import can specify a default import or named bindings, but not both (1:13) +> 1 | import type foo, {named} from "foo" + | ^^^^^^^^^^^^" +`; + exports[`snippet: #1 format[babel-ts] 1`] = ` "A type-only import can specify a default import or named bindings, but not both. (1:1) > 1 | import type foo, * as namespace from "foo" @@ -52,3 +64,9 @@ exports[`snippet: #1 format[typescript] 1`] = ` | ^^^^^^^^^^^^^^^^^^^^^^^^ Cause: A type-only import can specify a default import or named bindings, but not both." `; + +exports[`snippet: #1 format[yuku-ts] 1`] = ` +"A type-only import can specify a default import or named bindings, but not both (1:13) +> 1 | import type foo, * as namespace from "foo" + | ^^^^^^^^^^^^^^^^^^^" +`; diff --git a/tests/format/typescript/_errors_/type-only-import/format.test.js b/tests/format/typescript/_errors_/type-only-import/format.test.js index 1eb1bf1ca..b2fcf2cfb 100644 --- a/tests/format/typescript/_errors_/type-only-import/format.test.js +++ b/tests/format/typescript/_errors_/type-only-import/format.test.js @@ -8,6 +8,7 @@ runFormatTest( // `babel-ts` didn't reject // "babel-ts", "oxc-ts", + "yuku-ts", ], ); runFormatTest( @@ -18,5 +19,5 @@ runFormatTest( 'import type foo, * as namespace from "foo"', ], }, - ["typescript", "babel-ts", "oxc-ts"], + ["typescript", "babel-ts", "oxc-ts", "yuku-ts"], ); diff --git a/tests/format/typescript/_errors_/value-of-abstract-property/__snapshots__/format.test.js.snap b/tests/format/typescript/_errors_/value-of-abstract-property/__snapshots__/format.test.js.snap index f97fe4389..80cf57ab3 100644 --- a/tests/format/typescript/_errors_/value-of-abstract-property/__snapshots__/format.test.js.snap +++ b/tests/format/typescript/_errors_/value-of-abstract-property/__snapshots__/format.test.js.snap @@ -28,3 +28,12 @@ exports[`value-of-abstract-property.ts format[typescript] 1`] = ` 4 | Cause: Abstract property cannot have an initializer." `; + +exports[`value-of-abstract-property.ts format[yuku-ts] 1`] = ` +"An abstract property cannot have an initializer (2:19) + 1 | abstract class Foo { +> 2 | abstract prop = 3; + | ^ + 3 | } + 4 |" +`; diff --git a/tests/format/typescript/_errors_/value-of-abstract-property/format.test.js b/tests/format/typescript/_errors_/value-of-abstract-property/format.test.js index 1831abd0d..f78aea343 100644 --- a/tests/format/typescript/_errors_/value-of-abstract-property/format.test.js +++ b/tests/format/typescript/_errors_/value-of-abstract-property/format.test.js @@ -1 +1 @@ -runFormatTest(import.meta, ["typescript", "babel-ts", "oxc-ts"]); +runFormatTest(import.meta, ["typescript", "babel-ts", "oxc-ts", "yuku-ts"]);