""} />;
+
;
+
;
+
;
+
;
+
+
+ GitHub Desktop has encountered an unrecoverable error and will need to 1231231
+ restart. This has been reported to the team, but if youencounter this121312331
+ repeatedly please report this issue to the GitHub 12312312312312313{" "}{" "}
+
;
+```
+
+
+
diff --git a/crates/rome_js_formatter/tests/specs/prettier/jsx/jsx/regex.js b/crates/rome_js_formatter/tests/specs/prettier/jsx/jsx/regex.js
new file mode 100644
index 00000000000..9f92918c687
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/jsx/jsx/regex.js
@@ -0,0 +1,4 @@
+x =
one
,
two
;
+x =
{}
+x =
{1/2}
+x =
{/w/.test(s)}
diff --git a/crates/rome_js_formatter/tests/specs/prettier/jsx/jsx/regex.js.prettier-snap b/crates/rome_js_formatter/tests/specs/prettier/jsx/jsx/regex.js.prettier-snap
new file mode 100644
index 00000000000..51e43f6ab41
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/jsx/jsx/regex.js.prettier-snap
@@ -0,0 +1,4 @@
+(x =
one
), (
two
);
+x =
{};
+x =
{1 / 2};
+x =
{/w/.test(s)};
diff --git a/crates/rome_js_formatter/tests/specs/prettier/jsx/jsx/return-statement.js b/crates/rome_js_formatter/tests/specs/prettier/jsx/jsx/return-statement.js
new file mode 100644
index 00000000000..8afae7ce1d5
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/jsx/jsx/return-statement.js
@@ -0,0 +1,53 @@
+const NonBreakingArrowExpression = () =>
;
+
+const BreakingArrowExpression = () =>
;
+
+const NonBreakingArrowExpressionWBody = () => {
+ return (
+
+ );
+};
+
+const BreakingArrowExpressionWBody = () => {
+ return
+};
+
+const NonBreakingFunction = function() {
+ return (
+
+ );
+};
+
+const BreakingFunction = function() {
+ return
+};
+
+class NonBreakingClass extends React.component {
+ render() {
+ return (
+
+ );
+ }
+}
+
+class BreakingClass extends React.component {
+ render() {
+ return
;
+ }
+}
diff --git a/crates/rome_js_formatter/tests/specs/prettier/jsx/jsx/return-statement.js.prettier-snap b/crates/rome_js_formatter/tests/specs/prettier/jsx/jsx/return-statement.js.prettier-snap
new file mode 100644
index 00000000000..12c609fbd54
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/jsx/jsx/return-statement.js.prettier-snap
@@ -0,0 +1,47 @@
+const NonBreakingArrowExpression = () =>
;
+
+const BreakingArrowExpression = () => (
+
+);
+
+const NonBreakingArrowExpressionWBody = () => {
+ return
;
+};
+
+const BreakingArrowExpressionWBody = () => {
+ return (
+
+ );
+};
+
+const NonBreakingFunction = function () {
+ return
;
+};
+
+const BreakingFunction = function () {
+ return (
+
+ );
+};
+
+class NonBreakingClass extends React.component {
+ render() {
+ return
;
+ }
+}
+
+class BreakingClass extends React.component {
+ render() {
+ return (
+
+ );
+ }
+}
diff --git a/crates/rome_js_formatter/tests/specs/prettier/jsx/jsx/self-closing.js b/crates/rome_js_formatter/tests/specs/prettier/jsx/jsx/self-closing.js
new file mode 100644
index 00000000000..26e68c617b5
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/jsx/jsx/self-closing.js
@@ -0,0 +1,2 @@
+
;
+
;
diff --git a/crates/rome_js_formatter/tests/specs/prettier/jsx/jsx/self-closing.js.prettier-snap b/crates/rome_js_formatter/tests/specs/prettier/jsx/jsx/self-closing.js.prettier-snap
new file mode 100644
index 00000000000..26e68c617b5
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/jsx/jsx/self-closing.js.prettier-snap
@@ -0,0 +1,2 @@
+
;
+
;
diff --git a/crates/rome_js_formatter/tests/specs/prettier/jsx/jsx/spacing.js b/crates/rome_js_formatter/tests/specs/prettier/jsx/jsx/spacing.js
new file mode 100644
index 00000000000..4409ae7169e
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/jsx/jsx/spacing.js
@@ -0,0 +1,19 @@
+const Labels = {
+ label1: (
+
+ Label 1
+
+ ),
+
+ label2: (
+
+ Label 2
+
+ ),
+
+ label3: (
+
+ Label 3
+
+ ),
+};
diff --git a/crates/rome_js_formatter/tests/specs/prettier/jsx/jsx/spacing.js.prettier-snap b/crates/rome_js_formatter/tests/specs/prettier/jsx/jsx/spacing.js.prettier-snap
new file mode 100644
index 00000000000..9bca2650e3b
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/jsx/jsx/spacing.js.prettier-snap
@@ -0,0 +1,7 @@
+const Labels = {
+ label1:
Label 1,
+
+ label2:
Label 2,
+
+ label3:
Label 3,
+};
diff --git a/crates/rome_js_formatter/tests/specs/prettier/jsx/jsx/template-literal-in-attr.js b/crates/rome_js_formatter/tests/specs/prettier/jsx/jsx/template-literal-in-attr.js
new file mode 100644
index 00000000000..c7bdbfc8889
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/jsx/jsx/template-literal-in-attr.js
@@ -0,0 +1,8 @@
+
diff --git a/crates/rome_js_formatter/tests/specs/prettier/jsx/jsx/template-literal-in-attr.js.prettier-snap b/crates/rome_js_formatter/tests/specs/prettier/jsx/jsx/template-literal-in-attr.js.prettier-snap
new file mode 100644
index 00000000000..ab78603cf59
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/jsx/jsx/template-literal-in-attr.js.prettier-snap
@@ -0,0 +1,10 @@
+
;
diff --git a/crates/rome_js_formatter/tests/specs/prettier/jsx/jsx/ternary.js b/crates/rome_js_formatter/tests/specs/prettier/jsx/jsx/ternary.js
new file mode 100644
index 00000000000..26efc1e8743
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/jsx/jsx/ternary.js
@@ -0,0 +1 @@
+a == 3 ? (a =
123
) : (a =
abc
);
diff --git a/crates/rome_js_formatter/tests/specs/prettier/jsx/jsx/ternary.js.prettier-snap b/crates/rome_js_formatter/tests/specs/prettier/jsx/jsx/ternary.js.prettier-snap
new file mode 100644
index 00000000000..26efc1e8743
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/jsx/jsx/ternary.js.prettier-snap
@@ -0,0 +1 @@
+a == 3 ? (a =
123
) : (a =
abc
);
diff --git a/crates/rome_js_formatter/tests/specs/prettier/jsx/last-line/last_line.js b/crates/rome_js_formatter/tests/specs/prettier/jsx/last-line/last_line.js
new file mode 100644
index 00000000000..2417fa94b81
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/jsx/last-line/last_line.js
@@ -0,0 +1,10 @@
+
+ and the children go here
+ and here too
+
diff --git a/crates/rome_js_formatter/tests/specs/prettier/jsx/last-line/last_line.js.prettier-snap b/crates/rome_js_formatter/tests/specs/prettier/jsx/last-line/last_line.js.prettier-snap
new file mode 100644
index 00000000000..76bf87705cd
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/jsx/last-line/last_line.js.prettier-snap
@@ -0,0 +1,10 @@
+
+ and the children go here
+ and here too
+;
diff --git a/crates/rome_js_formatter/tests/specs/prettier/jsx/last-line/single_prop_multiline_string.js b/crates/rome_js_formatter/tests/specs/prettier/jsx/last-line/single_prop_multiline_string.js
new file mode 100644
index 00000000000..541733229dd
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/jsx/last-line/single_prop_multiline_string.js
@@ -0,0 +1,6 @@
+
;
+
+
Content;
diff --git a/crates/rome_js_formatter/tests/specs/prettier/jsx/last-line/single_prop_multiline_string.js.prettier-snap b/crates/rome_js_formatter/tests/specs/prettier/jsx/last-line/single_prop_multiline_string.js.prettier-snap
new file mode 100644
index 00000000000..74f720b35ac
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/jsx/last-line/single_prop_multiline_string.js.prettier-snap
@@ -0,0 +1,12 @@
+
;
+
+
+ Content
+;
diff --git a/crates/rome_js_formatter/tests/specs/prettier/package.json b/crates/rome_js_formatter/tests/specs/prettier/package.json
index 3623207b419..b6e73a629fb 100644
--- a/crates/rome_js_formatter/tests/specs/prettier/package.json
+++ b/crates/rome_js_formatter/tests/specs/prettier/package.json
@@ -4,10 +4,10 @@
"start": "node prepare_tests"
},
"dependencies": {
- "prettier": "^2.7.0"
+ "prettier": "^2.7.1"
},
"devDependencies": {
- "@types/prettier": "^2.6.3"
+ "@types/prettier": "^2.7.1"
},
"engines": {
"pnpm": "^7.0.0"
diff --git a/crates/rome_js_formatter/tests/specs/prettier/pnpm-lock.yaml b/crates/rome_js_formatter/tests/specs/prettier/pnpm-lock.yaml
index 3ce4d77f715..61e598cf0eb 100644
--- a/crates/rome_js_formatter/tests/specs/prettier/pnpm-lock.yaml
+++ b/crates/rome_js_formatter/tests/specs/prettier/pnpm-lock.yaml
@@ -1,23 +1,23 @@
lockfileVersion: 5.4
specifiers:
- '@types/prettier': ^2.6.3
- prettier: ^2.7.0
+ '@types/prettier': ^2.7.1
+ prettier: ^2.7.1
dependencies:
- prettier: 2.7.0
+ prettier: 2.7.1
devDependencies:
- '@types/prettier': 2.6.3
+ '@types/prettier': 2.7.1
packages:
- /@types/prettier/2.6.3:
- resolution: {integrity: sha512-ymZk3LEC/fsut+/Q5qejp6R9O1rMxz3XaRHDV6kX8MrGAhOSPqVARbDi+EZvInBpw+BnCX3TD240byVkOfQsHg==}
+ /@types/prettier/2.7.1:
+ resolution: {integrity: sha512-ri0UmynRRvZiiUJdiz38MmIblKK+oH30MztdBVR95dv/Ubw6neWSb8u1XpRb72L4qsZOhz+L+z9JD40SJmfWow==}
dev: true
- /prettier/2.7.0:
- resolution: {integrity: sha512-nwoX4GMFgxoPC6diHvSwmK/4yU8FFH3V8XWtLQrbj4IBsK2pkYhG4kf/ljF/haaZ/aii+wNJqISrCDPgxGWDVQ==}
+ /prettier/2.7.1:
+ resolution: {integrity: sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==}
engines: {node: '>=10.13.0'}
hasBin: true
dev: false
diff --git a/crates/rome_js_formatter/tests/specs/prettier/prepare_tests.js b/crates/rome_js_formatter/tests/specs/prettier/prepare_tests.js
index 9840ae0e75e..9b90c17dcbc 100644
--- a/crates/rome_js_formatter/tests/specs/prettier/prepare_tests.js
+++ b/crates/rome_js_formatter/tests/specs/prettier/prepare_tests.js
@@ -3,78 +3,92 @@ const path = require("path");
const prettier = require("prettier");
if (process.argv.length < 3) {
- console.error("Usage: node prepare_tests.js
");
- process.exit(2);
+ console.error("Usage: node prepare_tests.js ");
+ process.exit(2);
}
const PRETTIER_ROOT = path.resolve(process.argv[2], "tests/format");
// Recursively traverse the test directory to search for snapshots files
async function traverseDir(dir, config) {
- for (const entry of await fs.readdir(dir, { withFileTypes: true })) {
- if (entry.isDirectory()) {
- await traverseDir(path.resolve(dir, entry.name), config);
- continue;
- }
-
- if (entry.isFile()) {
- // Ignore all non-snapshot files
- if (entry.name !== "jsfmt.spec.js.snap") {
- continue;
- }
-
- // Load the snapshot as CommonJS
- const snapshot = require(path.join(dir, entry.name));
-
- // Snapshot files are stored in __snapshots__/jsfmt.spec.js.snap,
- // iterate on all files in the parent directory
- for (const file of await fs.readdir(path.resolve(dir, ".."))) {
- // for each file, check it has an associated snapshot (the
- // jsfmt.spec.js files don't have one for instance)
- const key = `${file} format 1`;
- if (key in snapshot && typeof snapshot[key] === "string") {
- // Compute a relative path from the Prettier root directory
- // to this file, then an absolute path using the rome_js_formatter
- // specs directory as a root instead
- const filePath = path.resolve(dir, "..", file);
- const relPath = path.relative(PRETTIER_ROOT, filePath);
- const outPath = path.resolve(__dirname, relPath);
-
- // Copy the snapshot input file, ensuring the
- // parent directory exists
- const outDir = path.resolve(outPath, "..");
- await fs.mkdir(outDir, { recursive: true });
- await fs.copyFile(filePath, outPath);
-
- // Extract the expected output from the snapshot text
- const OUTPUT = "=====================================output=====================================";
- const FOOTER = "================================================================================";
-
- let snapContent = snapshot[key];
- const start = snapContent.match(new RegExp(OUTPUT + "\\n"));
- const end = snapContent.match(new RegExp("\\n" + FOOTER));
-
- const startOffset = start.index + start[0].length;
- const endOffset = end.index;
- snapContent = snapContent.substring(startOffset, endOffset);
- try {
- // We need to reformat prettier snapshot
- // because Rome and Prettier have different default options
- snapContent = prettier.format(snapContent, config);
- } catch (error) {
- console.error(`Prettier format error in ${filePath}: ${error}`);
- }
- // Write the expected output to an additional prettier-snap
- // file in the specs directory
- const snapFile = path.basename(file) + ".prettier-snap";
- await fs.writeFile(
- path.resolve(outDir, snapFile),
- snapContent,
- );
- }
- }
- }
- }
+ for (const entry of await fs.readdir(dir, { withFileTypes: true })) {
+ if (entry.isDirectory()) {
+ await traverseDir(path.resolve(dir, entry.name), config);
+ continue;
+ }
+
+ if (entry.isFile()) {
+ const file = entry.name;
+
+ // Ignore spec files
+ if (file.startsWith("jsfmt.spec")) {
+ continue;
+ }
+
+ // Compute a relative path from the Prettier root directory
+ // to this file, then an absolute path using the rome_js_formatter
+ // specs directory as a root instead
+ const filePath = path.resolve(dir, file);
+ const relPath = path.relative(PRETTIER_ROOT, filePath);
+ const outPath = path.resolve(__dirname, relPath);
+ const snapshotPath = path.resolve(dir, "__snapshots__", "jsfmt.spec.js.snap")
+ const snapFile = path.basename(file) + ".prettier-snap";
+
+ const snapshot = require(snapshotPath);
+
+ const key = `${file} format 1`;
+ let snapshotContent = snapshot[key];
+
+ if (snapshotContent !== undefined) {
+ // Copy the snapshot input file, ensuring the
+ // parent directory exists
+ const outDir = path.resolve(outPath, "..");
+ await fs.mkdir(outDir, { recursive: true });
+ await fs.copyFile(filePath, outPath);
+ // Extract the expected output from the snapshot text
+ const OUTPUT =
+ "=====================================output=====================================";
+ const FOOTER =
+ "================================================================================";
+
+ const start = snapshotContent.match(new RegExp(OUTPUT + "\\n"));
+ const end = snapshotContent.match(new RegExp("\\n" + FOOTER));
+
+ const startOffset = start.index + start[0].length;
+ const endOffset = end.index;
+ snapshotContent = snapshotContent.substring(startOffset, endOffset);
+
+ try {
+ // We need to reformat prettier snapshot
+ // because Rome and Prettier have different default options
+ snapshotContent = prettier.format(snapshotContent, config);
+ } catch (error) {
+ console.error(`Prettier format error in ${filePath}: ${error}`);
+ }
+ // Write the expected output to an additional prettier-snap
+ // file in the specs directory
+ await fs.writeFile(path.resolve(outDir, snapFile), snapshotContent);
+ } else {
+ // Load content from file current fule
+ const content = await fs.readFile(filePath, { encoding: "utf8" });
+
+ try {
+ // Try to format input with prettier
+ const prettierOutput = prettier.format(content, config);
+
+ const outDir = path.resolve(outPath, "..");
+ await fs.mkdir(outDir, { recursive: true });
+ await fs.copyFile(filePath, outPath);
+
+ // Write the expected output to an additional prettier-snap
+ // file in the specs directory
+ await fs.writeFile(path.resolve(outDir, snapFile), prettierOutput);
+ } catch (error) {
+ console.error(`Prettier format error in ${filePath}: ${error}`);
+ }
+ }
+ }
+ }
}
const PRETTIER_ROOT_JS = path.resolve(PRETTIER_ROOT, "js");
@@ -82,36 +96,36 @@ const PRETTIER_ROOT_JSX = path.resolve(PRETTIER_ROOT, "jsx");
const PRETTIER_ROOT_TS = path.resolve(PRETTIER_ROOT, "typescript");
const defaultConfig = {
- trailingComma: "all",
- tabWidth: 2,
- printWidth: 80,
- singleQuote: false,
- useTabs: false,
+ trailingComma: "all",
+ tabWidth: 2,
+ printWidth: 80,
+ singleQuote: false,
+ jsxSingleQuote: false,
+ useTabs: false,
+ embeddedLanguageFormatting: "off",
};
async function main() {
- console.log("Extracting tests from %s ...", PRETTIER_ROOT_JS);
- await traverseDir(PRETTIER_ROOT_JS, {
- ...defaultConfig,
- parser: "babel",
- });
-
- console.log("Extracting tests from %s ...", {PRETTIER_ROOT_JSX});
- await traverseDir(PRETTIER_ROOT_JSX, {
- ...defaultConfig,
- parser: "babel",
- });
-
- console.log("Extracting tests from %s ...", PRETTIER_ROOT_TS);
- await traverseDir(PRETTIER_ROOT_TS, {
- ...defaultConfig,
- parser: "typescript"
- });
+ console.log("Extracting tests from %s ...", PRETTIER_ROOT_JS);
+ await traverseDir(PRETTIER_ROOT_JS, {
+ ...defaultConfig,
+ parser: "babel",
+ });
+
+ console.log("Extracting tests from %s ...", { PRETTIER_ROOT_JSX });
+ await traverseDir(PRETTIER_ROOT_JSX, {
+ ...defaultConfig,
+ parser: "babel",
+ });
+
+ console.log("Extracting tests from %s ...", PRETTIER_ROOT_TS);
+ await traverseDir(PRETTIER_ROOT_TS, {
+ ...defaultConfig,
+ parser: "typescript",
+ });
}
-main().catch(
- (err) => {
- console.error(err);
- process.exit(1);
- },
-);
+main().catch((err) => {
+ console.error(err);
+ process.exit(1);
+});
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/angular-component-examples/test.component.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/angular-component-examples/test.component.ts.snap
index 21ce0ffebb5..832fcaa714f 100644
--- a/crates/rome_js_formatter/tests/specs/prettier/typescript/angular-component-examples/test.component.ts.snap
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/angular-component-examples/test.component.ts.snap
@@ -1,5 +1,7 @@
---
source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/angular-component-examples/test.component.ts
---
# Input
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/arrow/comments.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/arrow/comments.ts.snap
index 14d52ed8780..3c7a54d7fd4 100644
--- a/crates/rome_js_formatter/tests/specs/prettier/typescript/arrow/comments.ts.snap
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/arrow/comments.ts.snap
@@ -1,5 +1,7 @@
---
source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/arrow/comments.ts
---
# Input
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/arrows/arrow_function_expression.ts b/crates/rome_js_formatter/tests/specs/prettier/typescript/arrows/arrow_function_expression.ts
new file mode 100644
index 00000000000..4e406bdbc98
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/arrows/arrow_function_expression.ts
@@ -0,0 +1 @@
+a = (b?) => c;
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/arrows/arrow_function_expression.ts.prettier-snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/arrows/arrow_function_expression.ts.prettier-snap
new file mode 100644
index 00000000000..4e406bdbc98
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/arrows/arrow_function_expression.ts.prettier-snap
@@ -0,0 +1 @@
+a = (b?) => c;
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/arrows/short_body.ts b/crates/rome_js_formatter/tests/specs/prettier/typescript/arrows/short_body.ts
new file mode 100644
index 00000000000..f7533b94f4c
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/arrows/short_body.ts
@@ -0,0 +1,6 @@
+const initializeSnapshotState = (
+ testFile: Path,
+ update: boolean,
+ testPath: string,
+ expand: boolean,
+) => new SnapshotState(testFile, update, testPath, expand);
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/arrows/short_body.ts.prettier-snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/arrows/short_body.ts.prettier-snap
new file mode 100644
index 00000000000..f7533b94f4c
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/arrows/short_body.ts.prettier-snap
@@ -0,0 +1,6 @@
+const initializeSnapshotState = (
+ testFile: Path,
+ update: boolean,
+ testPath: string,
+ expand: boolean,
+) => new SnapshotState(testFile, update, testPath, expand);
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/arrows/type_params.ts b/crates/rome_js_formatter/tests/specs/prettier/typescript/arrows/type_params.ts
new file mode 100644
index 00000000000..fae332d3954
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/arrows/type_params.ts
@@ -0,0 +1 @@
+(a) => { }
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/arrows/type_params.ts.prettier-snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/arrows/type_params.ts.prettier-snap
new file mode 100644
index 00000000000..37947b85db5
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/arrows/type_params.ts.prettier-snap
@@ -0,0 +1 @@
+(a) => {};
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/as/as.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/as/as.ts.snap
index bec88409655..e0cd0e94bbb 100644
--- a/crates/rome_js_formatter/tests/specs/prettier/typescript/as/as.ts.snap
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/as/as.ts.snap
@@ -1,5 +1,7 @@
---
source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/as/as.ts
---
# Input
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/as/export_default_as.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/as/export_default_as.ts.snap
index 7fd5bfbdf72..531916dc047 100644
--- a/crates/rome_js_formatter/tests/specs/prettier/typescript/as/export_default_as.ts.snap
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/as/export_default_as.ts.snap
@@ -1,5 +1,7 @@
---
source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/as/export_default_as.ts
---
# Input
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/assert/index.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/assert/index.ts.snap
index baee3a253a6..af75b3e99d2 100644
--- a/crates/rome_js_formatter/tests/specs/prettier/typescript/assert/index.ts.snap
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/assert/index.ts.snap
@@ -1,5 +1,7 @@
---
source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/assert/index.ts
---
# Input
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/class/empty-method-body.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/class/empty-method-body.ts.snap
index ce6188d0d30..af1422c1046 100644
--- a/crates/rome_js_formatter/tests/specs/prettier/typescript/class/empty-method-body.ts.snap
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/class/empty-method-body.ts.snap
@@ -1,5 +1,7 @@
---
source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/class/empty-method-body.ts
---
# Input
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/class/quoted-property.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/class/quoted-property.ts.snap
index 461a9db7913..66feb86f166 100644
--- a/crates/rome_js_formatter/tests/specs/prettier/typescript/class/quoted-property.ts.snap
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/class/quoted-property.ts.snap
@@ -1,5 +1,7 @@
---
source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/class/quoted-property.ts
---
# Input
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/comments/declare_function.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/comments/declare_function.ts.snap
index 02adf14017f..91aee4f859d 100644
--- a/crates/rome_js_formatter/tests/specs/prettier/typescript/comments/declare_function.ts.snap
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/comments/declare_function.ts.snap
@@ -1,5 +1,7 @@
---
source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/comments/declare_function.ts
---
# Input
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/compiler/castParentheses.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/compiler/castParentheses.ts.snap
index 9278d0afc75..43d2a854256 100644
--- a/crates/rome_js_formatter/tests/specs/prettier/typescript/compiler/castParentheses.ts.snap
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/compiler/castParentheses.ts.snap
@@ -1,5 +1,7 @@
---
source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/compiler/castParentheses.ts
---
# Input
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/compiler/commentInNamespaceDeclarationWithIdentifierPathName.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/compiler/commentInNamespaceDeclarationWithIdentifierPathName.ts.snap
index 694f034cad8..6f7f6985199 100644
--- a/crates/rome_js_formatter/tests/specs/prettier/typescript/compiler/commentInNamespaceDeclarationWithIdentifierPathName.ts.snap
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/compiler/commentInNamespaceDeclarationWithIdentifierPathName.ts.snap
@@ -1,5 +1,7 @@
---
source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/compiler/commentInNamespaceDeclarationWithIdentifierPathName.ts
---
# Input
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/conditional-types/issue-13275.ts.prettier-snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/conditional-types/issue-13275.ts.prettier-snap
index de1ccb2859a..8f2955f7318 100644
--- a/crates/rome_js_formatter/tests/specs/prettier/typescript/conditional-types/issue-13275.ts.prettier-snap
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/conditional-types/issue-13275.ts.prettier-snap
@@ -1 +1 @@
-type Foo = T extends ((...a: any[]) => infer R extends string) ? R : never;
+type Foo = T extends (...a: any[]) => infer R extends string ? R : never;
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/conditional-types/issue-13275.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/conditional-types/issue-13275.ts.snap
new file mode 100644
index 00000000000..7c7b8e4a858
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/conditional-types/issue-13275.ts.snap
@@ -0,0 +1,46 @@
+---
+source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/conditional-types/issue-13275.ts
+---
+
+# Input
+
+```js
+type Foo = T extends ((...a: any[]) => infer R extends string) ? R : never;
+```
+
+
+# Prettier differences
+
+```diff
+--- Prettier
++++ Rome
+@@ -1 +1 @@
+-type Foo = T extends (...a: any[]) => infer R extends string ? R : never;
++type Foo = T extends ((...a: any[]) => infer R extends string) ? R : never;
+```
+
+# Output
+
+```js
+type Foo = T extends ((...a: any[]) => infer R extends string) ? R : never;
+```
+
+
+# Errors
+```
+issue-13275.ts:1:65 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected `?` but instead found `)`
+
+ > 1 │ type Foo = T extends ((...a: any[]) => infer R extends string) ? R : never;
+ │ ^
+ 2 │
+
+ i Remove )
+
+
+```
+
+
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractInstantiations2.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractInstantiations2.ts.snap
index 71d54ad9cde..5dae437ebc3 100644
--- a/crates/rome_js_formatter/tests/specs/prettier/typescript/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractInstantiations2.ts.snap
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractInstantiations2.ts.snap
@@ -1,7 +1,7 @@
---
source: crates/rome_js_formatter/tests/prettier_tests.rs
info:
- test_file: "typescript\\conformance\\classes\\classDeclarations\\classAbstractKeyword\\classAbstractInstantiations2.ts"
+ test_file: typescript/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractInstantiations2.ts
---
# Input
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/conformance/es6/templates/templateStringWithEmbeddedTypeAssertionOnAdditionES6.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/conformance/es6/templates/templateStringWithEmbeddedTypeAssertionOnAdditionES6.ts.snap
index 24c288d7e42..67084e8b357 100644
--- a/crates/rome_js_formatter/tests/specs/prettier/typescript/conformance/es6/templates/templateStringWithEmbeddedTypeAssertionOnAdditionES6.ts.snap
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/conformance/es6/templates/templateStringWithEmbeddedTypeAssertionOnAdditionES6.ts.snap
@@ -1,5 +1,7 @@
---
source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/conformance/es6/templates/templateStringWithEmbeddedTypeAssertionOnAdditionES6.ts
---
# Input
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/conformance/types/tuple/contextualTypeWithTuple.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/conformance/types/tuple/contextualTypeWithTuple.ts.snap
index b3e999005b7..8cf9a4e4740 100644
--- a/crates/rome_js_formatter/tests/specs/prettier/typescript/conformance/types/tuple/contextualTypeWithTuple.ts.snap
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/conformance/types/tuple/contextualTypeWithTuple.ts.snap
@@ -1,5 +1,7 @@
---
source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/conformance/types/tuple/contextualTypeWithTuple.ts
---
# Input
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/conformance/types/tuple/indexerWithTuple.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/conformance/types/tuple/indexerWithTuple.ts.snap
index 2a693892c30..10b47bb0ca2 100644
--- a/crates/rome_js_formatter/tests/specs/prettier/typescript/conformance/types/tuple/indexerWithTuple.ts.snap
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/conformance/types/tuple/indexerWithTuple.ts.snap
@@ -1,5 +1,7 @@
---
source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/conformance/types/tuple/indexerWithTuple.ts
---
# Input
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/conformance/types/tuple/typeInferenceWithTupleType.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/conformance/types/tuple/typeInferenceWithTupleType.ts.snap
index 86332c839eb..5d4cd802e36 100644
--- a/crates/rome_js_formatter/tests/specs/prettier/typescript/conformance/types/tuple/typeInferenceWithTupleType.ts.snap
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/conformance/types/tuple/typeInferenceWithTupleType.ts.snap
@@ -1,5 +1,7 @@
---
source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/conformance/types/tuple/typeInferenceWithTupleType.ts
---
# Input
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/conformance/types/union/unionTypeCallSignatures.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/conformance/types/union/unionTypeCallSignatures.ts.snap
index 1e1be231668..3cbb9d4c9ff 100644
--- a/crates/rome_js_formatter/tests/specs/prettier/typescript/conformance/types/union/unionTypeCallSignatures.ts.snap
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/conformance/types/union/unionTypeCallSignatures.ts.snap
@@ -1,5 +1,7 @@
---
source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/conformance/types/union/unionTypeCallSignatures.ts
---
# Input
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/conformance/types/union/unionTypeCallSignatures3.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/conformance/types/union/unionTypeCallSignatures3.ts.snap
index 3198777d907..a66300bf3dd 100644
--- a/crates/rome_js_formatter/tests/specs/prettier/typescript/conformance/types/union/unionTypeCallSignatures3.ts.snap
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/conformance/types/union/unionTypeCallSignatures3.ts.snap
@@ -1,5 +1,7 @@
---
source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/conformance/types/union/unionTypeCallSignatures3.ts
---
# Input
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/conformance/types/union/unionTypeCallSignatures4.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/conformance/types/union/unionTypeCallSignatures4.ts.snap
index 4da75f92130..173a47dd370 100644
--- a/crates/rome_js_formatter/tests/specs/prettier/typescript/conformance/types/union/unionTypeCallSignatures4.ts.snap
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/conformance/types/union/unionTypeCallSignatures4.ts.snap
@@ -1,5 +1,7 @@
---
source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/conformance/types/union/unionTypeCallSignatures4.ts
---
# Input
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/conformance/types/union/unionTypeConstructSignatures.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/conformance/types/union/unionTypeConstructSignatures.ts.snap
index 50fb818fd7d..3ffb593ace1 100644
--- a/crates/rome_js_formatter/tests/specs/prettier/typescript/conformance/types/union/unionTypeConstructSignatures.ts.snap
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/conformance/types/union/unionTypeConstructSignatures.ts.snap
@@ -1,5 +1,7 @@
---
source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/conformance/types/union/unionTypeConstructSignatures.ts
---
# Input
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/conformance/types/union/unionTypeEquivalence.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/conformance/types/union/unionTypeEquivalence.ts.snap
index 52ca5ce0fac..5e6a6da7c10 100644
--- a/crates/rome_js_formatter/tests/specs/prettier/typescript/conformance/types/union/unionTypeEquivalence.ts.snap
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/conformance/types/union/unionTypeEquivalence.ts.snap
@@ -1,5 +1,7 @@
---
source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/conformance/types/union/unionTypeEquivalence.ts
---
# Input
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/conformance/types/union/unionTypeFromArrayLiteral.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/conformance/types/union/unionTypeFromArrayLiteral.ts.snap
index 89d7c340ee6..33a788075c3 100644
--- a/crates/rome_js_formatter/tests/specs/prettier/typescript/conformance/types/union/unionTypeFromArrayLiteral.ts.snap
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/conformance/types/union/unionTypeFromArrayLiteral.ts.snap
@@ -1,5 +1,7 @@
---
source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/conformance/types/union/unionTypeFromArrayLiteral.ts
---
# Input
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/conformance/types/union/unionTypeIndexSignature.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/conformance/types/union/unionTypeIndexSignature.ts.snap
index a23ef76be60..f42be5996d6 100644
--- a/crates/rome_js_formatter/tests/specs/prettier/typescript/conformance/types/union/unionTypeIndexSignature.ts.snap
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/conformance/types/union/unionTypeIndexSignature.ts.snap
@@ -1,5 +1,7 @@
---
source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/conformance/types/union/unionTypeIndexSignature.ts
---
# Input
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/declare/trailing-comma/function-rest-trailing-comma.ts b/crates/rome_js_formatter/tests/specs/prettier/typescript/declare/trailing-comma/function-rest-trailing-comma.ts
new file mode 100644
index 00000000000..62624cad660
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/declare/trailing-comma/function-rest-trailing-comma.ts
@@ -0,0 +1,2 @@
+declare function foo(...args: any[], )
+declare function foo(...long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_args: any[], )
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/declare/trailing-comma/function-rest-trailing-comma.ts.prettier-snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/declare/trailing-comma/function-rest-trailing-comma.ts.prettier-snap
new file mode 100644
index 00000000000..fbc85167947
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/declare/trailing-comma/function-rest-trailing-comma.ts.prettier-snap
@@ -0,0 +1,4 @@
+declare function foo(...args: any[]);
+declare function foo(
+ ...long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_args: any[]
+);
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/declare/trailing-comma/function-rest-trailing-comma.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/declare/trailing-comma/function-rest-trailing-comma.ts.snap
new file mode 100644
index 00000000000..2a509a20f76
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/declare/trailing-comma/function-rest-trailing-comma.ts.snap
@@ -0,0 +1,64 @@
+---
+source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/declare/trailing-comma/function-rest-trailing-comma.ts
+---
+
+# Input
+
+```js
+declare function foo(...args: any[], )
+declare function foo(...long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_args: any[], )
+```
+
+
+# Prettier differences
+
+```diff
+--- Prettier
++++ Rome
+@@ -1,4 +1,2 @@
+-declare function foo(...args: any[]);
+-declare function foo(
+- ...long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_args: any[]
+-);
++declare function foo(...args: any[], )
++declare function foo(...long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_args: any[], )
+```
+
+# Output
+
+```js
+declare function foo(...args: any[], )
+declare function foo(...long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_args: any[], )
+```
+
+
+# Errors
+```
+function-rest-trailing-comma.ts:1:22 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × rest elements may not have trailing commas
+
+ > 1 │ declare function foo(...args: any[], )
+ │ ^^^^^^^^^^^^^^
+ 2 │ declare function foo(...long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_args: any[], )
+ 3 │
+
+function-rest-trailing-comma.ts:2:22 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × rest elements may not have trailing commas
+
+ 1 │ declare function foo(...args: any[], )
+ > 2 │ declare function foo(...long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_args: any[], )
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ 3 │
+
+
+```
+
+# Lines exceeding max width of 80 characters
+```
+ 2: declare function foo(...long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_args: any[], )
+```
+
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/decorators-ts/angular.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/decorators-ts/angular.ts.snap
index d6616a5eb41..4b0ea975fdb 100644
--- a/crates/rome_js_formatter/tests/specs/prettier/typescript/decorators-ts/angular.ts.snap
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/decorators-ts/angular.ts.snap
@@ -1,5 +1,7 @@
---
source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/decorators-ts/angular.ts
---
# Input
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/decorators-ts/typeorm.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/decorators-ts/typeorm.ts.snap
index da62fc56464..7d916a4e88b 100644
--- a/crates/rome_js_formatter/tests/specs/prettier/typescript/decorators-ts/typeorm.ts.snap
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/decorators-ts/typeorm.ts.snap
@@ -1,5 +1,7 @@
---
source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/decorators-ts/typeorm.ts
---
# Input
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/decorators/decorators-comments.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/decorators/decorators-comments.ts.snap
index 50ad05e6e27..f8a1b8eb277 100644
--- a/crates/rome_js_formatter/tests/specs/prettier/typescript/decorators/decorators-comments.ts.snap
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/decorators/decorators-comments.ts.snap
@@ -1,7 +1,7 @@
---
source: crates/rome_js_formatter/tests/prettier_tests.rs
info:
- test_file: "typescript\\decorators\\decorators-comments.ts"
+ test_file: typescript/decorators/decorators-comments.ts
---
# Input
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/end-of-line/multiline.ts b/crates/rome_js_formatter/tests/specs/prettier/typescript/end-of-line/multiline.ts
new file mode 100644
index 00000000000..b5186657980
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/end-of-line/multiline.ts
@@ -0,0 +1,23 @@
+type IAmIncredibleLongParameterType = {};
+const IAmAnotherFunctionName = (_0: IAmIncredibleLongParameterType) => {};
+export const IAmIncredibleLongFunctionName = IAmAnotherFunctionName(
+ (_0: IAmIncredibleLongParameterType) => {
+ setTimeout(() => {
+ /*
+ Multiline comment
+ Multiline comment
+ Multiline comment
+ */
+ console.log(
+ 'Multiline string\
+ Multiline string\
+ Multiline string'
+ );
+ console.log(
+ `Multiline \n string\
+ Multiline string\
+ Multiline string`
+ );
+ });
+ }
+);
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/end-of-line/multiline.ts.prettier-snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/end-of-line/multiline.ts.prettier-snap
new file mode 100644
index 00000000000..f39472c27b7
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/end-of-line/multiline.ts.prettier-snap
@@ -0,0 +1,23 @@
+type IAmIncredibleLongParameterType = {};
+const IAmAnotherFunctionName = (_0: IAmIncredibleLongParameterType) => {};
+export const IAmIncredibleLongFunctionName = IAmAnotherFunctionName(
+ (_0: IAmIncredibleLongParameterType) => {
+ setTimeout(() => {
+ /*
+ Multiline comment
+ Multiline comment
+ Multiline comment
+ */
+ console.log(
+ "Multiline string\
+ Multiline string\
+ Multiline string",
+ );
+ console.log(
+ `Multiline \n string\
+ Multiline string\
+ Multiline string`,
+ );
+ });
+ },
+);
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/enum/computed-members.ts.prettier-snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/enum/computed-members.ts.prettier-snap
index 7ba227a2b2c..ba48c56ec74 100644
--- a/crates/rome_js_formatter/tests/specs/prettier/typescript/enum/computed-members.ts.prettier-snap
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/enum/computed-members.ts.prettier-snap
@@ -1,13 +1,13 @@
enum A {
- i++,
+ [i++],
}
const bar = "bar";
enum B {
- bar = 2,
+ [bar] = 2,
}
const foo = () => "foo";
enum C {
- foo() = 2,
+ [foo()] = 2,
}
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/enum/computed-members.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/enum/computed-members.ts.snap
deleted file mode 100644
index d94559fca9e..00000000000
--- a/crates/rome_js_formatter/tests/specs/prettier/typescript/enum/computed-members.ts.snap
+++ /dev/null
@@ -1,69 +0,0 @@
----
-source: crates/rome_js_formatter/tests/prettier_tests.rs
-info:
- test_file: typescript/enum/computed-members.ts
----
-
-# Input
-
-```js
-enum A {
- [i++],
-}
-
-const bar = "bar"
-enum B {
- [bar] = 2,
-}
-
-const foo = () => "foo";
-enum C {
- [foo()] = 2,
-}
-```
-
-
-# Prettier differences
-
-```diff
---- Prettier
-+++ Rome
-@@ -1,13 +1,13 @@
- enum A {
-- i++,
-+ [i++],
- }
-
- const bar = "bar";
- enum B {
-- bar = 2,
-+ [bar] = 2,
- }
-
- const foo = () => "foo";
- enum C {
-- foo() = 2,
-+ [foo()] = 2,
- }
-```
-
-# Output
-
-```js
-enum A {
- [i++],
-}
-
-const bar = "bar";
-enum B {
- [bar] = 2,
-}
-
-const foo = () => "foo";
-enum C {
- [foo()] = 2,
-}
-```
-
-
-
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/error-recovery/jsdoc_only_types.ts.prettier-snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/error-recovery/jsdoc_only_types.ts.prettier-snap
index fd8cf153040..7751d7a4192 100644
--- a/crates/rome_js_formatter/tests/specs/prettier/typescript/error-recovery/jsdoc_only_types.ts.prettier-snap
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/error-recovery/jsdoc_only_types.ts.prettier-snap
@@ -1,8 +1,8 @@
let a: *;
function b(x: ?) {}
let c: ?string;
-let d: ?string;
+let d: string?;
let e: ?(string | number);
let f: !string;
-let g: !string;
+let g: string!;
let h: !(string | number);
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/error-recovery/jsdoc_only_types.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/error-recovery/jsdoc_only_types.ts.snap
index f3da2e4f2f2..1f5c707c791 100644
--- a/crates/rome_js_formatter/tests/specs/prettier/typescript/error-recovery/jsdoc_only_types.ts.snap
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/error-recovery/jsdoc_only_types.ts.snap
@@ -29,10 +29,10 @@ let h: !(string | number);
+*
function b(x: ?) {}
-let c: ?string;
--let d: ?string;
+-let d: string?;
-let e: ?(string | number);
-let f: !string;
--let g: !string;
+-let g: string!;
-let h: !(string | number);
+let c:
+?string
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/export-default/function_as.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/export-default/function_as.ts.snap
index 8ea53add4b4..0eaf08b2265 100644
--- a/crates/rome_js_formatter/tests/specs/prettier/typescript/export-default/function_as.ts.snap
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/export-default/function_as.ts.snap
@@ -1,5 +1,7 @@
---
source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/export-default/function_as.ts
---
# Input
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/generic/ungrouped-parameters.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/generic/ungrouped-parameters.ts.snap
index 63d617b9f8a..1604fdcb0e5 100644
--- a/crates/rome_js_formatter/tests/specs/prettier/typescript/generic/ungrouped-parameters.ts.snap
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/generic/ungrouped-parameters.ts.snap
@@ -1,5 +1,7 @@
---
source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/generic/ungrouped-parameters.ts
---
# Input
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/import-export/type-modifier.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/import-export/type-modifier.ts.snap
index 8d7ca0b0c41..d8385b1a882 100644
--- a/crates/rome_js_formatter/tests/specs/prettier/typescript/import-export/type-modifier.ts.snap
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/import-export/type-modifier.ts.snap
@@ -1,7 +1,7 @@
---
source: crates/rome_js_formatter/tests/prettier_tests.rs
info:
- test_file: "typescript\\import-export\\type-modifier.ts"
+ test_file: typescript/import-export/type-modifier.ts
---
# Input
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/instantiation-expression/binary-expr.ts.prettier-snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/instantiation-expression/binary-expr.ts.prettier-snap
index 1a5bcb63130..ff501026c58 100644
--- a/crates/rome_js_formatter/tests/specs/prettier/typescript/instantiation-expression/binary-expr.ts.prettier-snap
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/instantiation-expression/binary-expr.ts.prettier-snap
@@ -1 +1,2 @@
-new A() < B > C;
+new A();
+C;
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/instantiation-expression/binary-expr.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/instantiation-expression/binary-expr.ts.snap
new file mode 100644
index 00000000000..a027a9c0cfb
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/instantiation-expression/binary-expr.ts.snap
@@ -0,0 +1,33 @@
+---
+source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/instantiation-expression/binary-expr.ts
+---
+
+# Input
+
+```js
+new A < B >
+C
+```
+
+
+# Prettier differences
+
+```diff
+--- Prettier
++++ Rome
+@@ -1,2 +1 @@
+-new A();
+-C;
++new A() < B > C;
+```
+
+# Output
+
+```js
+new A() < B > C;
+```
+
+
+
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/interface/long-type-parameters/long-type-parameters.ts b/crates/rome_js_formatter/tests/specs/prettier/typescript/interface/long-type-parameters/long-type-parameters.ts
new file mode 100644
index 00000000000..feedc34865a
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/interface/long-type-parameters/long-type-parameters.ts
@@ -0,0 +1,14 @@
+// https://github.com/vega/vega-lite/blob/ae13aff7b480cf9c994031eca08a6b1720e01ab3/src/mark.ts#L602
+export interface MarkDef<
+ M extends string | Mark = Mark,
+ ES extends ExprRef | SignalRef = ExprRef | SignalRef
+> extends GenericMarkDef,
+ Omit<
+ MarkConfig &
+ AreaConfig &
+ BarConfig & // always extends RectConfig
+ LineConfig &
+ TickConfig,
+ 'startAngle' | 'endAngle' | 'width' | 'height'
+ >,
+ MarkDefMixins {}
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/interface/long-type-parameters/long-type-parameters.ts.prettier-snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/interface/long-type-parameters/long-type-parameters.ts.prettier-snap
new file mode 100644
index 00000000000..fdd268e1c19
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/interface/long-type-parameters/long-type-parameters.ts.prettier-snap
@@ -0,0 +1,14 @@
+// https://github.com/vega/vega-lite/blob/ae13aff7b480cf9c994031eca08a6b1720e01ab3/src/mark.ts#L602
+export interface MarkDef<
+ M extends string | Mark = Mark,
+ ES extends ExprRef | SignalRef = ExprRef | SignalRef,
+> extends GenericMarkDef,
+ Omit<
+ MarkConfig &
+ AreaConfig &
+ BarConfig & // always extends RectConfig
+ LineConfig &
+ TickConfig,
+ "startAngle" | "endAngle" | "width" | "height"
+ >,
+ MarkDefMixins {}
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/multiparser-css/issue-6259.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/multiparser-css/issue-6259.ts.snap
index ab54963582e..34074d2b762 100644
--- a/crates/rome_js_formatter/tests/specs/prettier/typescript/multiparser-css/issue-6259.ts.snap
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/multiparser-css/issue-6259.ts.snap
@@ -1,5 +1,7 @@
---
source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/multiparser-css/issue-6259.ts
---
# Input
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/non-null/braces.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/non-null/braces.ts.snap
index d5549a38952..e04be1e5765 100644
--- a/crates/rome_js_formatter/tests/specs/prettier/typescript/non-null/braces.ts.snap
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/non-null/braces.ts.snap
@@ -1,5 +1,7 @@
---
source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/non-null/braces.ts
---
# Input
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/non-null/optional-chain.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/non-null/optional-chain.ts.snap
index 7bde7ecddb7..427d1b7f224 100644
--- a/crates/rome_js_formatter/tests/specs/prettier/typescript/non-null/optional-chain.ts.snap
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/non-null/optional-chain.ts.snap
@@ -1,5 +1,7 @@
---
source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/non-null/optional-chain.ts
---
# Input
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/nosemi/index-signature.ts b/crates/rome_js_formatter/tests/specs/prettier/typescript/nosemi/index-signature.ts
new file mode 100644
index 00000000000..ebe06818b74
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/nosemi/index-signature.ts
@@ -0,0 +1,4 @@
+class LocalStorage implements Storage {
+ [index: number]: string;
+ [key: string]: any;
+}
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/nosemi/index-signature.ts.prettier-snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/nosemi/index-signature.ts.prettier-snap
new file mode 100644
index 00000000000..ebe06818b74
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/nosemi/index-signature.ts.prettier-snap
@@ -0,0 +1,4 @@
+class LocalStorage implements Storage {
+ [index: number]: string;
+ [key: string]: any;
+}
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/nosemi/interface.ts b/crates/rome_js_formatter/tests/specs/prettier/typescript/nosemi/interface.ts
new file mode 100644
index 00000000000..41c42a9c624
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/nosemi/interface.ts
@@ -0,0 +1,8 @@
+interface Inline { x: string }
+
+interface MultiLine {
+ x: string;
+ y: string;
+}
+
+interface InlineMultiple { x: string; y: string }
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/nosemi/interface.ts.prettier-snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/nosemi/interface.ts.prettier-snap
new file mode 100644
index 00000000000..6e138fd9c28
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/nosemi/interface.ts.prettier-snap
@@ -0,0 +1,13 @@
+interface Inline {
+ x: string;
+}
+
+interface MultiLine {
+ x: string;
+ y: string;
+}
+
+interface InlineMultiple {
+ x: string;
+ y: string;
+}
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/nosemi/type.ts b/crates/rome_js_formatter/tests/specs/prettier/typescript/nosemi/type.ts
new file mode 100644
index 00000000000..5161f34ed9a
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/nosemi/type.ts
@@ -0,0 +1,3 @@
+type A = {disabled?: boolean, error?: string}
+
+const foo: {aasdf?: string; asdf?: number; foob?: string; zzz?: string; yyy: string} = {}
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/nosemi/type.ts.prettier-snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/nosemi/type.ts.prettier-snap
new file mode 100644
index 00000000000..b28ec4a9ca4
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/nosemi/type.ts.prettier-snap
@@ -0,0 +1,9 @@
+type A = { disabled?: boolean; error?: string };
+
+const foo: {
+ aasdf?: string;
+ asdf?: number;
+ foob?: string;
+ zzz?: string;
+ yyy: string;
+} = {};
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/quote-props/types.ts b/crates/rome_js_formatter/tests/specs/prettier/typescript/quote-props/types.ts
new file mode 100644
index 00000000000..2d37a43df1e
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/quote-props/types.ts
@@ -0,0 +1,9 @@
+type T = {
+ 0: string;
+ 5: number;
+}
+
+type U = {
+ 0: string;
+ "5": number;
+}
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/quote-props/types.ts.prettier-snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/quote-props/types.ts.prettier-snap
new file mode 100644
index 00000000000..e5b619ef56f
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/quote-props/types.ts.prettier-snap
@@ -0,0 +1,9 @@
+type T = {
+ 0: string;
+ 5: number;
+};
+
+type U = {
+ 0: string;
+ "5": number;
+};
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/range/export-assignment.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/range/export-assignment.ts.snap
index 65ff453c863..a07d153449d 100644
--- a/crates/rome_js_formatter/tests/specs/prettier/typescript/range/export-assignment.ts.snap
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/range/export-assignment.ts.snap
@@ -1,5 +1,7 @@
---
source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/range/export-assignment.ts
---
# Input
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/argument-expansion.ts b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/argument-expansion.ts
new file mode 100644
index 00000000000..aef1a1410c1
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/argument-expansion.ts
@@ -0,0 +1,19 @@
+const bar1 = [1,2,3].reduce((carry, value) => {
+ return [...carry, value];
+}, ([] satisfies unknown) satisfies number[]);
+
+const bar2 = [1,2,3].reduce((carry, value) => {
+ return [...carry, value];
+}, ([1, 2, 3] satisfies unknown) satisfies number[]);
+
+const bar3 = [1,2,3].reduce((carry, value) => {
+ return {...carry, [value]: true};
+}, ({} satisfies unknown) satisfies {[key: number]: boolean});
+
+const bar4 = [1,2,3].reduce((carry, value) => {
+ return {...carry, [value]: true};
+}, ({1: true} satisfies unknown) satisfies {[key: number]: boolean});
+
+const bar5 = [1,2,3].reduce((carry, value) => {
+ return [...carry, value];
+}, [] satisfies foo);
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/argument-expansion.ts.prettier-snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/argument-expansion.ts.prettier-snap
new file mode 100644
index 00000000000..eb86b04ee4c
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/argument-expansion.ts.prettier-snap
@@ -0,0 +1,25 @@
+const bar1 = [1, 2, 3].reduce((carry, value) => {
+ return [...carry, value];
+}, [] satisfies unknown satisfies number[]);
+
+const bar2 = [1, 2, 3].reduce(
+ (carry, value) => {
+ return [...carry, value];
+ },
+ [1, 2, 3] satisfies unknown satisfies number[]
+);
+
+const bar3 = [1, 2, 3].reduce((carry, value) => {
+ return { ...carry, [value]: true };
+}, {} satisfies unknown satisfies { [key: number]: boolean });
+
+const bar4 = [1, 2, 3].reduce(
+ (carry, value) => {
+ return { ...carry, [value]: true };
+ },
+ { 1: true } satisfies unknown satisfies { [key: number]: boolean }
+);
+
+const bar5 = [1, 2, 3].reduce((carry, value) => {
+ return [...carry, value];
+}, [] satisfies foo);
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/argument-expansion.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/argument-expansion.ts.snap
new file mode 100644
index 00000000000..09fcea7b100
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/argument-expansion.ts.snap
@@ -0,0 +1,735 @@
+---
+source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/satisfies-operators/argument-expansion.ts
+---
+
+# Input
+
+```js
+const bar1 = [1,2,3].reduce((carry, value) => {
+ return [...carry, value];
+}, ([] satisfies unknown) satisfies number[]);
+
+const bar2 = [1,2,3].reduce((carry, value) => {
+ return [...carry, value];
+}, ([1, 2, 3] satisfies unknown) satisfies number[]);
+
+const bar3 = [1,2,3].reduce((carry, value) => {
+ return {...carry, [value]: true};
+}, ({} satisfies unknown) satisfies {[key: number]: boolean});
+
+const bar4 = [1,2,3].reduce((carry, value) => {
+ return {...carry, [value]: true};
+}, ({1: true} satisfies unknown) satisfies {[key: number]: boolean});
+
+const bar5 = [1,2,3].reduce((carry, value) => {
+ return [...carry, value];
+}, [] satisfies foo);
+```
+
+
+# Prettier differences
+
+```diff
+--- Prettier
++++ Rome
+@@ -1,25 +1,37 @@
+-const bar1 = [1, 2, 3].reduce((carry, value) => {
++const bar1 = [1,2,3].reduce((carry, value) => {
+ return [...carry, value];
+-}, [] satisfies unknown satisfies number[]);
++}, ([] satisfies unknown)
++satisfies;
++number[]
++)
+
+-const bar2 = [1, 2, 3].reduce(
+- (carry, value) => {
+- return [...carry, value];
+- },
+- [1, 2, 3] satisfies unknown satisfies number[]
+-);
++const bar2 = [1,2,3].reduce((carry, value) => {
++ return [...carry, value];
++}, ([1, 2, 3] satisfies unknown)
++satisfies;
++number[]
++)
+
+-const bar3 = [1, 2, 3].reduce((carry, value) => {
+- return { ...carry, [value]: true };
+-}, {} satisfies unknown satisfies { [key: number]: boolean });
++const bar3 = [1,2,3].reduce((carry, value) => {
++ return {...carry, [value]: true};
++}, ({} satisfies unknown)
++satisfies;
++{
++ [key: number]
++ : boolean
++}
++)
+
+-const bar4 = [1, 2, 3].reduce(
+- (carry, value) => {
+- return { ...carry, [value]: true };
+- },
+- { 1: true } satisfies unknown satisfies { [key: number]: boolean }
+-);
++const bar4 = [1,2,3].reduce((carry, value) => {
++ return {...carry, [value]: true};
++}, ({1: true} satisfies unknown)
++satisfies;
++{
++ [key: number]
++ : boolean
++}
++)
+
+-const bar5 = [1, 2, 3].reduce((carry, value) => {
++const bar5 = [1,2,3].reduce((carry, value) => {
+ return [...carry, value];
+ }, [] satisfies foo);
+```
+
+# Output
+
+```js
+const bar1 = [1,2,3].reduce((carry, value) => {
+ return [...carry, value];
+}, ([] satisfies unknown)
+satisfies;
+number[]
+)
+
+const bar2 = [1,2,3].reduce((carry, value) => {
+ return [...carry, value];
+}, ([1, 2, 3] satisfies unknown)
+satisfies;
+number[]
+)
+
+const bar3 = [1,2,3].reduce((carry, value) => {
+ return {...carry, [value]: true};
+}, ({} satisfies unknown)
+satisfies;
+{
+ [key: number]
+ : boolean
+}
+)
+
+const bar4 = [1,2,3].reduce((carry, value) => {
+ return {...carry, [value]: true};
+}, ({1: true} satisfies unknown)
+satisfies;
+{
+ [key: number]
+ : boolean
+}
+)
+
+const bar5 = [1,2,3].reduce((carry, value) => {
+ return [...carry, value];
+}, [] satisfies foo);
+```
+
+
+# Errors
+```
+argument-expansion.ts:3:8 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected `)` but instead found `satisfies`
+
+ 1 │ const bar1 = [1,2,3].reduce((carry, value) => {
+ 2 │ return [...carry, value];
+ > 3 │ }, ([] satisfies unknown) satisfies number[]);
+ │ ^^^^^^^^^
+ 4 │
+ 5 │ const bar2 = [1,2,3].reduce((carry, value) => {
+
+ i Remove satisfies
+
+argument-expansion.ts:3:18 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected `,` but instead found `unknown`
+
+ 1 │ const bar1 = [1,2,3].reduce((carry, value) => {
+ 2 │ return [...carry, value];
+ > 3 │ }, ([] satisfies unknown) satisfies number[]);
+ │ ^^^^^^^
+ 4 │
+ 5 │ const bar2 = [1,2,3].reduce((carry, value) => {
+
+ i Remove unknown
+
+argument-expansion.ts:3:27 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 1 │ const bar1 = [1,2,3].reduce((carry, value) => {
+ 2 │ return [...carry, value];
+ > 3 │ }, ([] satisfies unknown) satisfies number[]);
+ │ ^^^^^^^^^
+ 4 │
+ 5 │ const bar2 = [1,2,3].reduce((carry, value) => {
+
+ i An explicit or implicit semicolon is expected here...
+
+ 1 │ const bar1 = [1,2,3].reduce((carry, value) => {
+ 2 │ return [...carry, value];
+ > 3 │ }, ([] satisfies unknown) satisfies number[]);
+ │ ^^^^^^^^^
+ 4 │
+ 5 │ const bar2 = [1,2,3].reduce((carry, value) => {
+
+ i ...Which is required to end this statement
+
+ > 1 │ const bar1 = [1,2,3].reduce((carry, value) => {
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ > 2 │ return [...carry, value];
+ > 3 │ }, ([] satisfies unknown) satisfies number[]);
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^
+ 4 │
+ 5 │ const bar2 = [1,2,3].reduce((carry, value) => {
+
+argument-expansion.ts:3:37 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 1 │ const bar1 = [1,2,3].reduce((carry, value) => {
+ 2 │ return [...carry, value];
+ > 3 │ }, ([] satisfies unknown) satisfies number[]);
+ │ ^^^^^^
+ 4 │
+ 5 │ const bar2 = [1,2,3].reduce((carry, value) => {
+
+ i An explicit or implicit semicolon is expected here...
+
+ 1 │ const bar1 = [1,2,3].reduce((carry, value) => {
+ 2 │ return [...carry, value];
+ > 3 │ }, ([] satisfies unknown) satisfies number[]);
+ │ ^^^^^^
+ 4 │
+ 5 │ const bar2 = [1,2,3].reduce((carry, value) => {
+
+ i ...Which is required to end this statement
+
+ 1 │ const bar1 = [1,2,3].reduce((carry, value) => {
+ 2 │ return [...carry, value];
+ > 3 │ }, ([] satisfies unknown) satisfies number[]);
+ │ ^^^^^^^^^^^^^^^^
+ 4 │
+ 5 │ const bar2 = [1,2,3].reduce((carry, value) => {
+
+argument-expansion.ts:3:44 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected an expression but instead found ']'
+
+ 1 │ const bar1 = [1,2,3].reduce((carry, value) => {
+ 2 │ return [...carry, value];
+ > 3 │ }, ([] satisfies unknown) satisfies number[]);
+ │ ^
+ 4 │
+ 5 │ const bar2 = [1,2,3].reduce((carry, value) => {
+
+ i Expected an expression here
+
+ 1 │ const bar1 = [1,2,3].reduce((carry, value) => {
+ 2 │ return [...carry, value];
+ > 3 │ }, ([] satisfies unknown) satisfies number[]);
+ │ ^
+ 4 │
+ 5 │ const bar2 = [1,2,3].reduce((carry, value) => {
+
+argument-expansion.ts:3:45 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 1 │ const bar1 = [1,2,3].reduce((carry, value) => {
+ 2 │ return [...carry, value];
+ > 3 │ }, ([] satisfies unknown) satisfies number[]);
+ │ ^
+ 4 │
+ 5 │ const bar2 = [1,2,3].reduce((carry, value) => {
+
+ i An explicit or implicit semicolon is expected here...
+
+ 1 │ const bar1 = [1,2,3].reduce((carry, value) => {
+ 2 │ return [...carry, value];
+ > 3 │ }, ([] satisfies unknown) satisfies number[]);
+ │ ^
+ 4 │
+ 5 │ const bar2 = [1,2,3].reduce((carry, value) => {
+
+ i ...Which is required to end this statement
+
+ 1 │ const bar1 = [1,2,3].reduce((carry, value) => {
+ 2 │ return [...carry, value];
+ > 3 │ }, ([] satisfies unknown) satisfies number[]);
+ │ ^^^^^^^^^
+ 4 │
+ 5 │ const bar2 = [1,2,3].reduce((carry, value) => {
+
+argument-expansion.ts:7:15 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected `)` but instead found `satisfies`
+
+ 5 │ const bar2 = [1,2,3].reduce((carry, value) => {
+ 6 │ return [...carry, value];
+ > 7 │ }, ([1, 2, 3] satisfies unknown) satisfies number[]);
+ │ ^^^^^^^^^
+ 8 │
+ 9 │ const bar3 = [1,2,3].reduce((carry, value) => {
+
+ i Remove satisfies
+
+argument-expansion.ts:7:25 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected `,` but instead found `unknown`
+
+ 5 │ const bar2 = [1,2,3].reduce((carry, value) => {
+ 6 │ return [...carry, value];
+ > 7 │ }, ([1, 2, 3] satisfies unknown) satisfies number[]);
+ │ ^^^^^^^
+ 8 │
+ 9 │ const bar3 = [1,2,3].reduce((carry, value) => {
+
+ i Remove unknown
+
+argument-expansion.ts:7:34 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 5 │ const bar2 = [1,2,3].reduce((carry, value) => {
+ 6 │ return [...carry, value];
+ > 7 │ }, ([1, 2, 3] satisfies unknown) satisfies number[]);
+ │ ^^^^^^^^^
+ 8 │
+ 9 │ const bar3 = [1,2,3].reduce((carry, value) => {
+
+ i An explicit or implicit semicolon is expected here...
+
+ 5 │ const bar2 = [1,2,3].reduce((carry, value) => {
+ 6 │ return [...carry, value];
+ > 7 │ }, ([1, 2, 3] satisfies unknown) satisfies number[]);
+ │ ^^^^^^^^^
+ 8 │
+ 9 │ const bar3 = [1,2,3].reduce((carry, value) => {
+
+ i ...Which is required to end this statement
+
+ 3 │ }, ([] satisfies unknown) satisfies number[]);
+ 4 │
+ > 5 │ const bar2 = [1,2,3].reduce((carry, value) => {
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ > 6 │ return [...carry, value];
+ > 7 │ }, ([1, 2, 3] satisfies unknown) satisfies number[]);
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ 8 │
+ 9 │ const bar3 = [1,2,3].reduce((carry, value) => {
+
+argument-expansion.ts:7:44 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 5 │ const bar2 = [1,2,3].reduce((carry, value) => {
+ 6 │ return [...carry, value];
+ > 7 │ }, ([1, 2, 3] satisfies unknown) satisfies number[]);
+ │ ^^^^^^
+ 8 │
+ 9 │ const bar3 = [1,2,3].reduce((carry, value) => {
+
+ i An explicit or implicit semicolon is expected here...
+
+ 5 │ const bar2 = [1,2,3].reduce((carry, value) => {
+ 6 │ return [...carry, value];
+ > 7 │ }, ([1, 2, 3] satisfies unknown) satisfies number[]);
+ │ ^^^^^^
+ 8 │
+ 9 │ const bar3 = [1,2,3].reduce((carry, value) => {
+
+ i ...Which is required to end this statement
+
+ 5 │ const bar2 = [1,2,3].reduce((carry, value) => {
+ 6 │ return [...carry, value];
+ > 7 │ }, ([1, 2, 3] satisfies unknown) satisfies number[]);
+ │ ^^^^^^^^^^^^^^^^
+ 8 │
+ 9 │ const bar3 = [1,2,3].reduce((carry, value) => {
+
+argument-expansion.ts:7:51 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected an expression but instead found ']'
+
+ 5 │ const bar2 = [1,2,3].reduce((carry, value) => {
+ 6 │ return [...carry, value];
+ > 7 │ }, ([1, 2, 3] satisfies unknown) satisfies number[]);
+ │ ^
+ 8 │
+ 9 │ const bar3 = [1,2,3].reduce((carry, value) => {
+
+ i Expected an expression here
+
+ 5 │ const bar2 = [1,2,3].reduce((carry, value) => {
+ 6 │ return [...carry, value];
+ > 7 │ }, ([1, 2, 3] satisfies unknown) satisfies number[]);
+ │ ^
+ 8 │
+ 9 │ const bar3 = [1,2,3].reduce((carry, value) => {
+
+argument-expansion.ts:7:52 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 5 │ const bar2 = [1,2,3].reduce((carry, value) => {
+ 6 │ return [...carry, value];
+ > 7 │ }, ([1, 2, 3] satisfies unknown) satisfies number[]);
+ │ ^
+ 8 │
+ 9 │ const bar3 = [1,2,3].reduce((carry, value) => {
+
+ i An explicit or implicit semicolon is expected here...
+
+ 5 │ const bar2 = [1,2,3].reduce((carry, value) => {
+ 6 │ return [...carry, value];
+ > 7 │ }, ([1, 2, 3] satisfies unknown) satisfies number[]);
+ │ ^
+ 8 │
+ 9 │ const bar3 = [1,2,3].reduce((carry, value) => {
+
+ i ...Which is required to end this statement
+
+ 5 │ const bar2 = [1,2,3].reduce((carry, value) => {
+ 6 │ return [...carry, value];
+ > 7 │ }, ([1, 2, 3] satisfies unknown) satisfies number[]);
+ │ ^^^^^^^^^
+ 8 │
+ 9 │ const bar3 = [1,2,3].reduce((carry, value) => {
+
+argument-expansion.ts:11:8 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected `)` but instead found `satisfies`
+
+ 9 │ const bar3 = [1,2,3].reduce((carry, value) => {
+ 10 │ return {...carry, [value]: true};
+ > 11 │ }, ({} satisfies unknown) satisfies {[key: number]: boolean});
+ │ ^^^^^^^^^
+ 12 │
+ 13 │ const bar4 = [1,2,3].reduce((carry, value) => {
+
+ i Remove satisfies
+
+argument-expansion.ts:11:18 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected `,` but instead found `unknown`
+
+ 9 │ const bar3 = [1,2,3].reduce((carry, value) => {
+ 10 │ return {...carry, [value]: true};
+ > 11 │ }, ({} satisfies unknown) satisfies {[key: number]: boolean});
+ │ ^^^^^^^
+ 12 │
+ 13 │ const bar4 = [1,2,3].reduce((carry, value) => {
+
+ i Remove unknown
+
+argument-expansion.ts:11:27 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 9 │ const bar3 = [1,2,3].reduce((carry, value) => {
+ 10 │ return {...carry, [value]: true};
+ > 11 │ }, ({} satisfies unknown) satisfies {[key: number]: boolean});
+ │ ^^^^^^^^^
+ 12 │
+ 13 │ const bar4 = [1,2,3].reduce((carry, value) => {
+
+ i An explicit or implicit semicolon is expected here...
+
+ 9 │ const bar3 = [1,2,3].reduce((carry, value) => {
+ 10 │ return {...carry, [value]: true};
+ > 11 │ }, ({} satisfies unknown) satisfies {[key: number]: boolean});
+ │ ^^^^^^^^^
+ 12 │
+ 13 │ const bar4 = [1,2,3].reduce((carry, value) => {
+
+ i ...Which is required to end this statement
+
+ 7 │ }, ([1, 2, 3] satisfies unknown) satisfies number[]);
+ 8 │
+ > 9 │ const bar3 = [1,2,3].reduce((carry, value) => {
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ > 10 │ return {...carry, [value]: true};
+ > 11 │ }, ({} satisfies unknown) satisfies {[key: number]: boolean});
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^
+ 12 │
+ 13 │ const bar4 = [1,2,3].reduce((carry, value) => {
+
+argument-expansion.ts:11:37 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 9 │ const bar3 = [1,2,3].reduce((carry, value) => {
+ 10 │ return {...carry, [value]: true};
+ > 11 │ }, ({} satisfies unknown) satisfies {[key: number]: boolean});
+ │ ^
+ 12 │
+ 13 │ const bar4 = [1,2,3].reduce((carry, value) => {
+
+ i An explicit or implicit semicolon is expected here...
+
+ 9 │ const bar3 = [1,2,3].reduce((carry, value) => {
+ 10 │ return {...carry, [value]: true};
+ > 11 │ }, ({} satisfies unknown) satisfies {[key: number]: boolean});
+ │ ^
+ 12 │
+ 13 │ const bar4 = [1,2,3].reduce((carry, value) => {
+
+ i ...Which is required to end this statement
+
+ 9 │ const bar3 = [1,2,3].reduce((carry, value) => {
+ 10 │ return {...carry, [value]: true};
+ > 11 │ }, ({} satisfies unknown) satisfies {[key: number]: boolean});
+ │ ^^^^^^^^^^^
+ 12 │
+ 13 │ const bar4 = [1,2,3].reduce((carry, value) => {
+
+argument-expansion.ts:11:42 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected `,` but instead found `:`
+
+ 9 │ const bar3 = [1,2,3].reduce((carry, value) => {
+ 10 │ return {...carry, [value]: true};
+ > 11 │ }, ({} satisfies unknown) satisfies {[key: number]: boolean});
+ │ ^
+ 12 │
+ 13 │ const bar4 = [1,2,3].reduce((carry, value) => {
+
+ i Remove :
+
+argument-expansion.ts:11:51 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 9 │ const bar3 = [1,2,3].reduce((carry, value) => {
+ 10 │ return {...carry, [value]: true};
+ > 11 │ }, ({} satisfies unknown) satisfies {[key: number]: boolean});
+ │ ^
+ 12 │
+ 13 │ const bar4 = [1,2,3].reduce((carry, value) => {
+
+ i An explicit or implicit semicolon is expected here...
+
+ 9 │ const bar3 = [1,2,3].reduce((carry, value) => {
+ 10 │ return {...carry, [value]: true};
+ > 11 │ }, ({} satisfies unknown) satisfies {[key: number]: boolean});
+ │ ^
+ 12 │
+ 13 │ const bar4 = [1,2,3].reduce((carry, value) => {
+
+ i ...Which is required to end this statement
+
+ 9 │ const bar3 = [1,2,3].reduce((carry, value) => {
+ 10 │ return {...carry, [value]: true};
+ > 11 │ }, ({} satisfies unknown) satisfies {[key: number]: boolean});
+ │ ^^^^^^^^^^^^^^
+ 12 │
+ 13 │ const bar4 = [1,2,3].reduce((carry, value) => {
+
+argument-expansion.ts:11:61 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected a statement but instead found ')'
+
+ 9 │ const bar3 = [1,2,3].reduce((carry, value) => {
+ 10 │ return {...carry, [value]: true};
+ > 11 │ }, ({} satisfies unknown) satisfies {[key: number]: boolean});
+ │ ^
+ 12 │
+ 13 │ const bar4 = [1,2,3].reduce((carry, value) => {
+
+ i Expected a statement here
+
+ 9 │ const bar3 = [1,2,3].reduce((carry, value) => {
+ 10 │ return {...carry, [value]: true};
+ > 11 │ }, ({} satisfies unknown) satisfies {[key: number]: boolean});
+ │ ^
+ 12 │
+ 13 │ const bar4 = [1,2,3].reduce((carry, value) => {
+
+argument-expansion.ts:15:15 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected `)` but instead found `satisfies`
+
+ 13 │ const bar4 = [1,2,3].reduce((carry, value) => {
+ 14 │ return {...carry, [value]: true};
+ > 15 │ }, ({1: true} satisfies unknown) satisfies {[key: number]: boolean});
+ │ ^^^^^^^^^
+ 16 │
+ 17 │ const bar5 = [1,2,3].reduce((carry, value) => {
+
+ i Remove satisfies
+
+argument-expansion.ts:15:25 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected `,` but instead found `unknown`
+
+ 13 │ const bar4 = [1,2,3].reduce((carry, value) => {
+ 14 │ return {...carry, [value]: true};
+ > 15 │ }, ({1: true} satisfies unknown) satisfies {[key: number]: boolean});
+ │ ^^^^^^^
+ 16 │
+ 17 │ const bar5 = [1,2,3].reduce((carry, value) => {
+
+ i Remove unknown
+
+argument-expansion.ts:15:34 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 13 │ const bar4 = [1,2,3].reduce((carry, value) => {
+ 14 │ return {...carry, [value]: true};
+ > 15 │ }, ({1: true} satisfies unknown) satisfies {[key: number]: boolean});
+ │ ^^^^^^^^^
+ 16 │
+ 17 │ const bar5 = [1,2,3].reduce((carry, value) => {
+
+ i An explicit or implicit semicolon is expected here...
+
+ 13 │ const bar4 = [1,2,3].reduce((carry, value) => {
+ 14 │ return {...carry, [value]: true};
+ > 15 │ }, ({1: true} satisfies unknown) satisfies {[key: number]: boolean});
+ │ ^^^^^^^^^
+ 16 │
+ 17 │ const bar5 = [1,2,3].reduce((carry, value) => {
+
+ i ...Which is required to end this statement
+
+ 11 │ }, ({} satisfies unknown) satisfies {[key: number]: boolean});
+ 12 │
+ > 13 │ const bar4 = [1,2,3].reduce((carry, value) => {
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ > 14 │ return {...carry, [value]: true};
+ > 15 │ }, ({1: true} satisfies unknown) satisfies {[key: number]: boolean});
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ 16 │
+ 17 │ const bar5 = [1,2,3].reduce((carry, value) => {
+
+argument-expansion.ts:15:44 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 13 │ const bar4 = [1,2,3].reduce((carry, value) => {
+ 14 │ return {...carry, [value]: true};
+ > 15 │ }, ({1: true} satisfies unknown) satisfies {[key: number]: boolean});
+ │ ^
+ 16 │
+ 17 │ const bar5 = [1,2,3].reduce((carry, value) => {
+
+ i An explicit or implicit semicolon is expected here...
+
+ 13 │ const bar4 = [1,2,3].reduce((carry, value) => {
+ 14 │ return {...carry, [value]: true};
+ > 15 │ }, ({1: true} satisfies unknown) satisfies {[key: number]: boolean});
+ │ ^
+ 16 │
+ 17 │ const bar5 = [1,2,3].reduce((carry, value) => {
+
+ i ...Which is required to end this statement
+
+ 13 │ const bar4 = [1,2,3].reduce((carry, value) => {
+ 14 │ return {...carry, [value]: true};
+ > 15 │ }, ({1: true} satisfies unknown) satisfies {[key: number]: boolean});
+ │ ^^^^^^^^^^^
+ 16 │
+ 17 │ const bar5 = [1,2,3].reduce((carry, value) => {
+
+argument-expansion.ts:15:49 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected `,` but instead found `:`
+
+ 13 │ const bar4 = [1,2,3].reduce((carry, value) => {
+ 14 │ return {...carry, [value]: true};
+ > 15 │ }, ({1: true} satisfies unknown) satisfies {[key: number]: boolean});
+ │ ^
+ 16 │
+ 17 │ const bar5 = [1,2,3].reduce((carry, value) => {
+
+ i Remove :
+
+argument-expansion.ts:15:58 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 13 │ const bar4 = [1,2,3].reduce((carry, value) => {
+ 14 │ return {...carry, [value]: true};
+ > 15 │ }, ({1: true} satisfies unknown) satisfies {[key: number]: boolean});
+ │ ^
+ 16 │
+ 17 │ const bar5 = [1,2,3].reduce((carry, value) => {
+
+ i An explicit or implicit semicolon is expected here...
+
+ 13 │ const bar4 = [1,2,3].reduce((carry, value) => {
+ 14 │ return {...carry, [value]: true};
+ > 15 │ }, ({1: true} satisfies unknown) satisfies {[key: number]: boolean});
+ │ ^
+ 16 │
+ 17 │ const bar5 = [1,2,3].reduce((carry, value) => {
+
+ i ...Which is required to end this statement
+
+ 13 │ const bar4 = [1,2,3].reduce((carry, value) => {
+ 14 │ return {...carry, [value]: true};
+ > 15 │ }, ({1: true} satisfies unknown) satisfies {[key: number]: boolean});
+ │ ^^^^^^^^^^^^^^
+ 16 │
+ 17 │ const bar5 = [1,2,3].reduce((carry, value) => {
+
+argument-expansion.ts:15:68 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected a statement but instead found ')'
+
+ 13 │ const bar4 = [1,2,3].reduce((carry, value) => {
+ 14 │ return {...carry, [value]: true};
+ > 15 │ }, ({1: true} satisfies unknown) satisfies {[key: number]: boolean});
+ │ ^
+ 16 │
+ 17 │ const bar5 = [1,2,3].reduce((carry, value) => {
+
+ i Expected a statement here
+
+ 13 │ const bar4 = [1,2,3].reduce((carry, value) => {
+ 14 │ return {...carry, [value]: true};
+ > 15 │ }, ({1: true} satisfies unknown) satisfies {[key: number]: boolean});
+ │ ^
+ 16 │
+ 17 │ const bar5 = [1,2,3].reduce((carry, value) => {
+
+argument-expansion.ts:19:7 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected `,` but instead found `satisfies`
+
+ 17 │ const bar5 = [1,2,3].reduce((carry, value) => {
+ 18 │ return [...carry, value];
+ > 19 │ }, [] satisfies foo);
+ │ ^^^^^^^^^
+ 20 │
+
+ i Remove satisfies
+
+argument-expansion.ts:19:17 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected `,` but instead found `foo`
+
+ 17 │ const bar5 = [1,2,3].reduce((carry, value) => {
+ 18 │ return [...carry, value];
+ > 19 │ }, [] satisfies foo);
+ │ ^^^
+ 20 │
+
+ i Remove foo
+
+
+```
+
+
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/assignment.ts b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/assignment.ts
new file mode 100644
index 00000000000..9b7139253bc
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/assignment.ts
@@ -0,0 +1,21 @@
+const extraRendererAttrs = ((attrs.rendererAttrs &&
+ this.utils.safeParseJsonString(attrs.rendererAttrs)) ||
+ Object.create(null)) satisfies FieldService.RendererAttributes;
+
+const annotate = (angular.injector satisfies any).$$annotate satisfies (
+ fn: Function
+) => string[];
+
+const originalPrototype = originalConstructor.prototype satisfies TComponent & InjectionTarget,
+ propertyToServiceName = originalPrototype._inject;
+
+this.previewPlayerHandle = (setInterval(async () => {
+ if (this.previewIsPlaying) {
+ await this.fetchNextPreviews();
+ this.currentPreviewIndex++;
+ }
+}, this.refreshDelay) satisfies unknown) satisfies number;
+
+this.intervalID = (setInterval(() => {
+ self.step();
+}, 30) satisfies unknown) satisfies number;
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/assignment.ts.prettier-snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/assignment.ts.prettier-snap
new file mode 100644
index 00000000000..35177c96b8a
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/assignment.ts.prettier-snap
@@ -0,0 +1,22 @@
+const extraRendererAttrs = ((attrs.rendererAttrs &&
+ this.utils.safeParseJsonString(attrs.rendererAttrs)) ||
+ Object.create(null)) satisfies FieldService.RendererAttributes;
+
+const annotate = (angular.injector satisfies any).$$annotate satisfies (
+ fn: Function
+) => string[];
+
+const originalPrototype = originalConstructor.prototype satisfies TComponent &
+ InjectionTarget,
+ propertyToServiceName = originalPrototype._inject;
+
+this.previewPlayerHandle = setInterval(async () => {
+ if (this.previewIsPlaying) {
+ await this.fetchNextPreviews();
+ this.currentPreviewIndex++;
+ }
+}, this.refreshDelay) satisfies unknown satisfies number;
+
+this.intervalID = setInterval(() => {
+ self.step();
+}, 30) satisfies unknown satisfies number;
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/assignment.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/assignment.ts.snap
new file mode 100644
index 00000000000..320be414362
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/assignment.ts.snap
@@ -0,0 +1,458 @@
+---
+source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/satisfies-operators/assignment.ts
+---
+
+# Input
+
+```js
+const extraRendererAttrs = ((attrs.rendererAttrs &&
+ this.utils.safeParseJsonString(attrs.rendererAttrs)) ||
+ Object.create(null)) satisfies FieldService.RendererAttributes;
+
+const annotate = (angular.injector satisfies any).$$annotate satisfies (
+ fn: Function
+) => string[];
+
+const originalPrototype = originalConstructor.prototype satisfies TComponent & InjectionTarget,
+ propertyToServiceName = originalPrototype._inject;
+
+this.previewPlayerHandle = (setInterval(async () => {
+ if (this.previewIsPlaying) {
+ await this.fetchNextPreviews();
+ this.currentPreviewIndex++;
+ }
+}, this.refreshDelay) satisfies unknown) satisfies number;
+
+this.intervalID = (setInterval(() => {
+ self.step();
+}, 30) satisfies unknown) satisfies number;
+```
+
+
+# Prettier differences
+
+```diff
+--- Prettier
++++ Rome
+@@ -1,22 +1,35 @@
+-const extraRendererAttrs = ((attrs.rendererAttrs &&
+- this.utils.safeParseJsonString(attrs.rendererAttrs)) ||
+- Object.create(null)) satisfies FieldService.RendererAttributes;
++const extraRendererAttrs =
++ (attrs.rendererAttrs &&
++ this.utils.safeParseJsonString(attrs.rendererAttrs)) ||
++ Object.create(null);
++satisfies;
++FieldService.RendererAttributes;
+
+-const annotate = (angular.injector satisfies any).$$annotate satisfies (
++const annotate = (angular.injector
++satisfies;
++any;
++).$$annotate satisfies (
+ fn: Function
+-) => string[];
++) => string[]
+
+-const originalPrototype = originalConstructor.prototype satisfies TComponent &
+- InjectionTarget,
+- propertyToServiceName = originalPrototype._inject;
++const originalPrototype = originalConstructor.prototype;
++satisfies;
++TComponent & InjectionTarget,
++ (propertyToServiceName = originalPrototype._inject);
+
+-this.previewPlayerHandle = setInterval(async () => {
++this.previewPlayerHandle = (setInterval(async () => {
+ if (this.previewIsPlaying) {
+ await this.fetchNextPreviews();
+ this.currentPreviewIndex++;
+ }
+-}, this.refreshDelay) satisfies unknown satisfies number;
++}, this.refreshDelay)
++satisfies;
++unknown;
++) satisfies number
+
+-this.intervalID = setInterval(() => {
++this.intervalID = (setInterval(() => {
+ self.step();
+-}, 30) satisfies unknown satisfies number;
++}, 30)
++satisfies;
++unknown;
++) satisfies number
+```
+
+# Output
+
+```js
+const extraRendererAttrs =
+ (attrs.rendererAttrs &&
+ this.utils.safeParseJsonString(attrs.rendererAttrs)) ||
+ Object.create(null);
+satisfies;
+FieldService.RendererAttributes;
+
+const annotate = (angular.injector
+satisfies;
+any;
+).$$annotate satisfies (
+ fn: Function
+) => string[]
+
+const originalPrototype = originalConstructor.prototype;
+satisfies;
+TComponent & InjectionTarget,
+ (propertyToServiceName = originalPrototype._inject);
+
+this.previewPlayerHandle = (setInterval(async () => {
+ if (this.previewIsPlaying) {
+ await this.fetchNextPreviews();
+ this.currentPreviewIndex++;
+ }
+}, this.refreshDelay)
+satisfies;
+unknown;
+) satisfies number
+
+this.intervalID = (setInterval(() => {
+ self.step();
+}, 30)
+satisfies;
+unknown;
+) satisfies number
+```
+
+
+# Errors
+```
+assignment.ts:3:24 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 1 │ const extraRendererAttrs = ((attrs.rendererAttrs &&
+ 2 │ this.utils.safeParseJsonString(attrs.rendererAttrs)) ||
+ > 3 │ Object.create(null)) satisfies FieldService.RendererAttributes;
+ │ ^^^^^^^^^
+ 4 │
+ 5 │ const annotate = (angular.injector satisfies any).$$annotate satisfies (
+
+ i An explicit or implicit semicolon is expected here...
+
+ 1 │ const extraRendererAttrs = ((attrs.rendererAttrs &&
+ 2 │ this.utils.safeParseJsonString(attrs.rendererAttrs)) ||
+ > 3 │ Object.create(null)) satisfies FieldService.RendererAttributes;
+ │ ^^^^^^^^^
+ 4 │
+ 5 │ const annotate = (angular.injector satisfies any).$$annotate satisfies (
+
+ i ...Which is required to end this statement
+
+ > 1 │ const extraRendererAttrs = ((attrs.rendererAttrs &&
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ > 2 │ this.utils.safeParseJsonString(attrs.rendererAttrs)) ||
+ > 3 │ Object.create(null)) satisfies FieldService.RendererAttributes;
+ │ ^^^^^^^^^^^^^^^^^^^^^
+ 4 │
+ 5 │ const annotate = (angular.injector satisfies any).$$annotate satisfies (
+
+assignment.ts:3:34 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 1 │ const extraRendererAttrs = ((attrs.rendererAttrs &&
+ 2 │ this.utils.safeParseJsonString(attrs.rendererAttrs)) ||
+ > 3 │ Object.create(null)) satisfies FieldService.RendererAttributes;
+ │ ^^^^^^^^^^^^
+ 4 │
+ 5 │ const annotate = (angular.injector satisfies any).$$annotate satisfies (
+
+ i An explicit or implicit semicolon is expected here...
+
+ 1 │ const extraRendererAttrs = ((attrs.rendererAttrs &&
+ 2 │ this.utils.safeParseJsonString(attrs.rendererAttrs)) ||
+ > 3 │ Object.create(null)) satisfies FieldService.RendererAttributes;
+ │ ^^^^^^^^^^^^
+ 4 │
+ 5 │ const annotate = (angular.injector satisfies any).$$annotate satisfies (
+
+ i ...Which is required to end this statement
+
+ 1 │ const extraRendererAttrs = ((attrs.rendererAttrs &&
+ 2 │ this.utils.safeParseJsonString(attrs.rendererAttrs)) ||
+ > 3 │ Object.create(null)) satisfies FieldService.RendererAttributes;
+ │ ^^^^^^^^^^^^^^^^^^^^^^
+ 4 │
+ 5 │ const annotate = (angular.injector satisfies any).$$annotate satisfies (
+
+assignment.ts:5:36 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected `)` but instead found `satisfies`
+
+ 3 │ Object.create(null)) satisfies FieldService.RendererAttributes;
+ 4 │
+ > 5 │ const annotate = (angular.injector satisfies any).$$annotate satisfies (
+ │ ^^^^^^^^^
+ 6 │ fn: Function
+ 7 │ ) => string[];
+
+ i Remove satisfies
+
+assignment.ts:5:46 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 3 │ Object.create(null)) satisfies FieldService.RendererAttributes;
+ 4 │
+ > 5 │ const annotate = (angular.injector satisfies any).$$annotate satisfies (
+ │ ^^^
+ 6 │ fn: Function
+ 7 │ ) => string[];
+
+ i An explicit or implicit semicolon is expected here...
+
+ 3 │ Object.create(null)) satisfies FieldService.RendererAttributes;
+ 4 │
+ > 5 │ const annotate = (angular.injector satisfies any).$$annotate satisfies (
+ │ ^^^
+ 6 │ fn: Function
+ 7 │ ) => string[];
+
+ i ...Which is required to end this statement
+
+ 3 │ Object.create(null)) satisfies FieldService.RendererAttributes;
+ 4 │
+ > 5 │ const annotate = (angular.injector satisfies any).$$annotate satisfies (
+ │ ^^^^^^^^^^^^^
+ 6 │ fn: Function
+ 7 │ ) => string[];
+
+assignment.ts:5:49 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 3 │ Object.create(null)) satisfies FieldService.RendererAttributes;
+ 4 │
+ > 5 │ const annotate = (angular.injector satisfies any).$$annotate satisfies (
+ │ ^
+ 6 │ fn: Function
+ 7 │ ) => string[];
+
+ i An explicit or implicit semicolon is expected here...
+
+ 3 │ Object.create(null)) satisfies FieldService.RendererAttributes;
+ 4 │
+ > 5 │ const annotate = (angular.injector satisfies any).$$annotate satisfies (
+ │ ^
+ 6 │ fn: Function
+ 7 │ ) => string[];
+
+ i ...Which is required to end this statement
+
+ 3 │ Object.create(null)) satisfies FieldService.RendererAttributes;
+ 4 │
+ > 5 │ const annotate = (angular.injector satisfies any).$$annotate satisfies (
+ │ ^^^^
+ 6 │ fn: Function
+ 7 │ ) => string[];
+
+assignment.ts:9:57 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 7 │ ) => string[];
+ 8 │
+ > 9 │ const originalPrototype = originalConstructor.prototype satisfies TComponent & InjectionTarget,
+ │ ^^^^^^^^^
+ 10 │ propertyToServiceName = originalPrototype._inject;
+ 11 │
+
+ i An explicit or implicit semicolon is expected here...
+
+ 7 │ ) => string[];
+ 8 │
+ > 9 │ const originalPrototype = originalConstructor.prototype satisfies TComponent & InjectionTarget,
+ │ ^^^^^^^^^
+ 10 │ propertyToServiceName = originalPrototype._inject;
+ 11 │
+
+ i ...Which is required to end this statement
+
+ 7 │ ) => string[];
+ 8 │
+ > 9 │ const originalPrototype = originalConstructor.prototype satisfies TComponent & InjectionTarget,
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ 10 │ propertyToServiceName = originalPrototype._inject;
+ 11 │
+
+assignment.ts:9:67 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 7 │ ) => string[];
+ 8 │
+ > 9 │ const originalPrototype = originalConstructor.prototype satisfies TComponent & InjectionTarget,
+ │ ^^^^^^^^^^
+ 10 │ propertyToServiceName = originalPrototype._inject;
+ 11 │
+
+ i An explicit or implicit semicolon is expected here...
+
+ 7 │ ) => string[];
+ 8 │
+ > 9 │ const originalPrototype = originalConstructor.prototype satisfies TComponent & InjectionTarget,
+ │ ^^^^^^^^^^
+ 10 │ propertyToServiceName = originalPrototype._inject;
+ 11 │
+
+ i ...Which is required to end this statement
+
+ 7 │ ) => string[];
+ 8 │
+ > 9 │ const originalPrototype = originalConstructor.prototype satisfies TComponent & InjectionTarget,
+ │ ^^^^^^^^^^^^^^^^^^^^
+ 10 │ propertyToServiceName = originalPrototype._inject;
+ 11 │
+
+assignment.ts:17:23 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected `)` but instead found `satisfies`
+
+ 15 │ this.currentPreviewIndex++;
+ 16 │ }
+ > 17 │ }, this.refreshDelay) satisfies unknown) satisfies number;
+ │ ^^^^^^^^^
+ 18 │
+ 19 │ this.intervalID = (setInterval(() => {
+
+ i Remove satisfies
+
+assignment.ts:17:33 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 15 │ this.currentPreviewIndex++;
+ 16 │ }
+ > 17 │ }, this.refreshDelay) satisfies unknown) satisfies number;
+ │ ^^^^^^^
+ 18 │
+ 19 │ this.intervalID = (setInterval(() => {
+
+ i An explicit or implicit semicolon is expected here...
+
+ 15 │ this.currentPreviewIndex++;
+ 16 │ }
+ > 17 │ }, this.refreshDelay) satisfies unknown) satisfies number;
+ │ ^^^^^^^
+ 18 │
+ 19 │ this.intervalID = (setInterval(() => {
+
+ i ...Which is required to end this statement
+
+ 15 │ this.currentPreviewIndex++;
+ 16 │ }
+ > 17 │ }, this.refreshDelay) satisfies unknown) satisfies number;
+ │ ^^^^^^^^^^^^^^^^^
+ 18 │
+ 19 │ this.intervalID = (setInterval(() => {
+
+assignment.ts:17:40 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 15 │ this.currentPreviewIndex++;
+ 16 │ }
+ > 17 │ }, this.refreshDelay) satisfies unknown) satisfies number;
+ │ ^
+ 18 │
+ 19 │ this.intervalID = (setInterval(() => {
+
+ i An explicit or implicit semicolon is expected here...
+
+ 15 │ this.currentPreviewIndex++;
+ 16 │ }
+ > 17 │ }, this.refreshDelay) satisfies unknown) satisfies number;
+ │ ^
+ 18 │
+ 19 │ this.intervalID = (setInterval(() => {
+
+ i ...Which is required to end this statement
+
+ 15 │ this.currentPreviewIndex++;
+ 16 │ }
+ > 17 │ }, this.refreshDelay) satisfies unknown) satisfies number;
+ │ ^^^^^^^^
+ 18 │
+ 19 │ this.intervalID = (setInterval(() => {
+
+assignment.ts:21:8 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected `)` but instead found `satisfies`
+
+ 19 │ this.intervalID = (setInterval(() => {
+ 20 │ self.step();
+ > 21 │ }, 30) satisfies unknown) satisfies number;
+ │ ^^^^^^^^^
+ 22 │
+
+ i Remove satisfies
+
+assignment.ts:21:18 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 19 │ this.intervalID = (setInterval(() => {
+ 20 │ self.step();
+ > 21 │ }, 30) satisfies unknown) satisfies number;
+ │ ^^^^^^^
+ 22 │
+
+ i An explicit or implicit semicolon is expected here...
+
+ 19 │ this.intervalID = (setInterval(() => {
+ 20 │ self.step();
+ > 21 │ }, 30) satisfies unknown) satisfies number;
+ │ ^^^^^^^
+ 22 │
+
+ i ...Which is required to end this statement
+
+ 19 │ this.intervalID = (setInterval(() => {
+ 20 │ self.step();
+ > 21 │ }, 30) satisfies unknown) satisfies number;
+ │ ^^^^^^^^^^^^^^^^^
+ 22 │
+
+assignment.ts:21:25 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 19 │ this.intervalID = (setInterval(() => {
+ 20 │ self.step();
+ > 21 │ }, 30) satisfies unknown) satisfies number;
+ │ ^
+ 22 │
+
+ i An explicit or implicit semicolon is expected here...
+
+ 19 │ this.intervalID = (setInterval(() => {
+ 20 │ self.step();
+ > 21 │ }, 30) satisfies unknown) satisfies number;
+ │ ^
+ 22 │
+
+ i ...Which is required to end this statement
+
+ 19 │ this.intervalID = (setInterval(() => {
+ 20 │ self.step();
+ > 21 │ }, 30) satisfies unknown) satisfies number;
+ │ ^^^^^^^^
+ 22 │
+
+
+```
+
+
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/basic.ts b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/basic.ts
new file mode 100644
index 00000000000..3eff7182b43
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/basic.ts
@@ -0,0 +1,30 @@
+const t1 = { a: 1 } satisfies I1;
+const t2 = { a: 1, b: 1 } satisfies I1;
+const t3 = { } satisfies I1;
+const t4: T1 = { a: "a" } satisfies T1;
+const t5 = (m => m.substring(0)) satisfies T2;
+const t6 = [1, 2] satisfies [number, number];
+let t7 = { a: 'test' } satisfies A;
+let t8 = { a: 'test', b: 'test' } satisfies A;
+
+const p = {
+ isEven: n => n % 2 === 0,
+ isOdd: n => n % 2 === 1
+} satisfies Predicates;
+
+let obj: { f(s: string): void } & Record = {
+ f(s) { },
+ g(s) { }
+} satisfies { g(s: string): void } & Record;
+
+({ f(x) { } }) satisfies { f(s: string): void };
+
+const car = {
+ start() { },
+ move(d) {
+ // d should be number
+ },
+ stop() { }
+} satisfies Movable & Record;
+
+var v = undefined satisfies 1;
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/basic.ts.prettier-snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/basic.ts.prettier-snap
new file mode 100644
index 00000000000..7a2f29b67d0
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/basic.ts.prettier-snap
@@ -0,0 +1,30 @@
+const t1 = { a: 1 } satisfies I1;
+const t2 = { a: 1, b: 1 } satisfies I1;
+const t3 = {} satisfies I1;
+const t4: T1 = { a: "a" } satisfies T1;
+const t5 = ((m) => m.substring(0)) satisfies T2;
+const t6 = [1, 2] satisfies [number, number];
+let t7 = { a: "test" } satisfies A;
+let t8 = { a: "test", b: "test" } satisfies A;
+
+const p = {
+ isEven: (n) => n % 2 === 0,
+ isOdd: (n) => n % 2 === 1,
+} satisfies Predicates;
+
+let obj: { f(s: string): void } & Record = {
+ f(s) {},
+ g(s) {},
+} satisfies { g(s: string): void } & Record;
+
+({ f(x) {} } satisfies { f(s: string): void });
+
+const car = {
+ start() {},
+ move(d) {
+ // d should be number
+ },
+ stop() {},
+} satisfies Movable & Record;
+
+var v = undefined satisfies 1;
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/basic.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/basic.ts.snap
new file mode 100644
index 00000000000..94737bae44f
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/basic.ts.snap
@@ -0,0 +1,1017 @@
+---
+source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/satisfies-operators/basic.ts
+---
+
+# Input
+
+```js
+const t1 = { a: 1 } satisfies I1;
+const t2 = { a: 1, b: 1 } satisfies I1;
+const t3 = { } satisfies I1;
+const t4: T1 = { a: "a" } satisfies T1;
+const t5 = (m => m.substring(0)) satisfies T2;
+const t6 = [1, 2] satisfies [number, number];
+let t7 = { a: 'test' } satisfies A;
+let t8 = { a: 'test', b: 'test' } satisfies A;
+
+const p = {
+ isEven: n => n % 2 === 0,
+ isOdd: n => n % 2 === 1
+} satisfies Predicates;
+
+let obj: { f(s: string): void } & Record = {
+ f(s) { },
+ g(s) { }
+} satisfies { g(s: string): void } & Record;
+
+({ f(x) { } }) satisfies { f(s: string): void };
+
+const car = {
+ start() { },
+ move(d) {
+ // d should be number
+ },
+ stop() { }
+} satisfies Movable & Record;
+
+var v = undefined satisfies 1;
+```
+
+
+# Prettier differences
+
+```diff
+--- Prettier
++++ Rome
+@@ -1,23 +1,51 @@
+-const t1 = { a: 1 } satisfies I1;
+-const t2 = { a: 1, b: 1 } satisfies I1;
+-const t3 = {} satisfies I1;
+-const t4: T1 = { a: "a" } satisfies T1;
+-const t5 = ((m) => m.substring(0)) satisfies T2;
+-const t6 = [1, 2] satisfies [number, number];
+-let t7 = { a: "test" } satisfies A;
+-let t8 = { a: "test", b: "test" } satisfies A;
++const t1 = { a: 1 };
++satisfies;
++I1;
++const t2 = { a: 1, b: 1 };
++satisfies;
++I1;
++const t3 = {};
++satisfies;
++I1;
++const t4: T1 = { a: "a" };
++satisfies;
++T1;
++const t5 = (m) => m.substring(0);
++satisfies;
++T2;
++const t6 = [1, 2];
++satisfies[(number, number)];
++let t7 = { a: "test" };
++satisfies;
++A;
++let t8 = { a: "test", b: "test" };
++satisfies;
++A;
+
+ const p = {
+ isEven: (n) => n % 2 === 0,
+ isOdd: (n) => n % 2 === 1,
+-} satisfies Predicates;
++};
++satisfies;
++Predicates;
+
+ let obj: { f(s: string): void } & Record = {
+ f(s) {},
+ g(s) {},
+-} satisfies { g(s: string): void } & Record;
++};
++satisfies;
++{
++ g(s: string)
++ : void
++}
++& Record
+
+-({ f(x) {} } satisfies { f(s: string): void });
++({ f(x) {} });
++satisfies;
++{
++ f(s: string)
++ : void
++}
+
+ const car = {
+ start() {},
+@@ -25,6 +53,10 @@
+ // d should be number
+ },
+ stop() {},
+-} satisfies Movable & Record;
++};
++satisfies;
++Movable & Record;
+
+-var v = undefined satisfies 1;
++var v = undefined;
++satisfies;
++1;
+```
+
+# Output
+
+```js
+const t1 = { a: 1 };
+satisfies;
+I1;
+const t2 = { a: 1, b: 1 };
+satisfies;
+I1;
+const t3 = {};
+satisfies;
+I1;
+const t4: T1 = { a: "a" };
+satisfies;
+T1;
+const t5 = (m) => m.substring(0);
+satisfies;
+T2;
+const t6 = [1, 2];
+satisfies[(number, number)];
+let t7 = { a: "test" };
+satisfies;
+A;
+let t8 = { a: "test", b: "test" };
+satisfies;
+A;
+
+const p = {
+ isEven: (n) => n % 2 === 0,
+ isOdd: (n) => n % 2 === 1,
+};
+satisfies;
+Predicates;
+
+let obj: { f(s: string): void } & Record = {
+ f(s) {},
+ g(s) {},
+};
+satisfies;
+{
+ g(s: string)
+ : void
+}
+& Record
+
+({ f(x) {} });
+satisfies;
+{
+ f(s: string)
+ : void
+}
+
+const car = {
+ start() {},
+ move(d) {
+ // d should be number
+ },
+ stop() {},
+};
+satisfies;
+Movable & Record;
+
+var v = undefined;
+satisfies;
+1;
+```
+
+
+# Errors
+```
+basic.ts:1:21 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ > 1 │ const t1 = { a: 1 } satisfies I1;
+ │ ^^^^^^^^^
+ 2 │ const t2 = { a: 1, b: 1 } satisfies I1;
+ 3 │ const t3 = { } satisfies I1;
+
+ i An explicit or implicit semicolon is expected here...
+
+ > 1 │ const t1 = { a: 1 } satisfies I1;
+ │ ^^^^^^^^^
+ 2 │ const t2 = { a: 1, b: 1 } satisfies I1;
+ 3 │ const t3 = { } satisfies I1;
+
+ i ...Which is required to end this statement
+
+ > 1 │ const t1 = { a: 1 } satisfies I1;
+ │ ^^^^^^^^^^^^^^^^^^^^
+ 2 │ const t2 = { a: 1, b: 1 } satisfies I1;
+ 3 │ const t3 = { } satisfies I1;
+
+basic.ts:1:31 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ > 1 │ const t1 = { a: 1 } satisfies I1;
+ │ ^^
+ 2 │ const t2 = { a: 1, b: 1 } satisfies I1;
+ 3 │ const t3 = { } satisfies I1;
+
+ i An explicit or implicit semicolon is expected here...
+
+ > 1 │ const t1 = { a: 1 } satisfies I1;
+ │ ^^
+ 2 │ const t2 = { a: 1, b: 1 } satisfies I1;
+ 3 │ const t3 = { } satisfies I1;
+
+ i ...Which is required to end this statement
+
+ > 1 │ const t1 = { a: 1 } satisfies I1;
+ │ ^^^^^^^^^^^^
+ 2 │ const t2 = { a: 1, b: 1 } satisfies I1;
+ 3 │ const t3 = { } satisfies I1;
+
+basic.ts:2:27 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 1 │ const t1 = { a: 1 } satisfies I1;
+ > 2 │ const t2 = { a: 1, b: 1 } satisfies I1;
+ │ ^^^^^^^^^
+ 3 │ const t3 = { } satisfies I1;
+ 4 │ const t4: T1 = { a: "a" } satisfies T1;
+
+ i An explicit or implicit semicolon is expected here...
+
+ 1 │ const t1 = { a: 1 } satisfies I1;
+ > 2 │ const t2 = { a: 1, b: 1 } satisfies I1;
+ │ ^^^^^^^^^
+ 3 │ const t3 = { } satisfies I1;
+ 4 │ const t4: T1 = { a: "a" } satisfies T1;
+
+ i ...Which is required to end this statement
+
+ 1 │ const t1 = { a: 1 } satisfies I1;
+ > 2 │ const t2 = { a: 1, b: 1 } satisfies I1;
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^
+ 3 │ const t3 = { } satisfies I1;
+ 4 │ const t4: T1 = { a: "a" } satisfies T1;
+
+basic.ts:2:37 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 1 │ const t1 = { a: 1 } satisfies I1;
+ > 2 │ const t2 = { a: 1, b: 1 } satisfies I1;
+ │ ^^
+ 3 │ const t3 = { } satisfies I1;
+ 4 │ const t4: T1 = { a: "a" } satisfies T1;
+
+ i An explicit or implicit semicolon is expected here...
+
+ 1 │ const t1 = { a: 1 } satisfies I1;
+ > 2 │ const t2 = { a: 1, b: 1 } satisfies I1;
+ │ ^^
+ 3 │ const t3 = { } satisfies I1;
+ 4 │ const t4: T1 = { a: "a" } satisfies T1;
+
+ i ...Which is required to end this statement
+
+ 1 │ const t1 = { a: 1 } satisfies I1;
+ > 2 │ const t2 = { a: 1, b: 1 } satisfies I1;
+ │ ^^^^^^^^^^^^
+ 3 │ const t3 = { } satisfies I1;
+ 4 │ const t4: T1 = { a: "a" } satisfies T1;
+
+basic.ts:3:16 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 1 │ const t1 = { a: 1 } satisfies I1;
+ 2 │ const t2 = { a: 1, b: 1 } satisfies I1;
+ > 3 │ const t3 = { } satisfies I1;
+ │ ^^^^^^^^^
+ 4 │ const t4: T1 = { a: "a" } satisfies T1;
+ 5 │ const t5 = (m => m.substring(0)) satisfies T2;
+
+ i An explicit or implicit semicolon is expected here...
+
+ 1 │ const t1 = { a: 1 } satisfies I1;
+ 2 │ const t2 = { a: 1, b: 1 } satisfies I1;
+ > 3 │ const t3 = { } satisfies I1;
+ │ ^^^^^^^^^
+ 4 │ const t4: T1 = { a: "a" } satisfies T1;
+ 5 │ const t5 = (m => m.substring(0)) satisfies T2;
+
+ i ...Which is required to end this statement
+
+ 1 │ const t1 = { a: 1 } satisfies I1;
+ 2 │ const t2 = { a: 1, b: 1 } satisfies I1;
+ > 3 │ const t3 = { } satisfies I1;
+ │ ^^^^^^^^^^^^^^^
+ 4 │ const t4: T1 = { a: "a" } satisfies T1;
+ 5 │ const t5 = (m => m.substring(0)) satisfies T2;
+
+basic.ts:3:26 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 1 │ const t1 = { a: 1 } satisfies I1;
+ 2 │ const t2 = { a: 1, b: 1 } satisfies I1;
+ > 3 │ const t3 = { } satisfies I1;
+ │ ^^
+ 4 │ const t4: T1 = { a: "a" } satisfies T1;
+ 5 │ const t5 = (m => m.substring(0)) satisfies T2;
+
+ i An explicit or implicit semicolon is expected here...
+
+ 1 │ const t1 = { a: 1 } satisfies I1;
+ 2 │ const t2 = { a: 1, b: 1 } satisfies I1;
+ > 3 │ const t3 = { } satisfies I1;
+ │ ^^
+ 4 │ const t4: T1 = { a: "a" } satisfies T1;
+ 5 │ const t5 = (m => m.substring(0)) satisfies T2;
+
+ i ...Which is required to end this statement
+
+ 1 │ const t1 = { a: 1 } satisfies I1;
+ 2 │ const t2 = { a: 1, b: 1 } satisfies I1;
+ > 3 │ const t3 = { } satisfies I1;
+ │ ^^^^^^^^^^^^
+ 4 │ const t4: T1 = { a: "a" } satisfies T1;
+ 5 │ const t5 = (m => m.substring(0)) satisfies T2;
+
+basic.ts:4:27 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 2 │ const t2 = { a: 1, b: 1 } satisfies I1;
+ 3 │ const t3 = { } satisfies I1;
+ > 4 │ const t4: T1 = { a: "a" } satisfies T1;
+ │ ^^^^^^^^^
+ 5 │ const t5 = (m => m.substring(0)) satisfies T2;
+ 6 │ const t6 = [1, 2] satisfies [number, number];
+
+ i An explicit or implicit semicolon is expected here...
+
+ 2 │ const t2 = { a: 1, b: 1 } satisfies I1;
+ 3 │ const t3 = { } satisfies I1;
+ > 4 │ const t4: T1 = { a: "a" } satisfies T1;
+ │ ^^^^^^^^^
+ 5 │ const t5 = (m => m.substring(0)) satisfies T2;
+ 6 │ const t6 = [1, 2] satisfies [number, number];
+
+ i ...Which is required to end this statement
+
+ 2 │ const t2 = { a: 1, b: 1 } satisfies I1;
+ 3 │ const t3 = { } satisfies I1;
+ > 4 │ const t4: T1 = { a: "a" } satisfies T1;
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^
+ 5 │ const t5 = (m => m.substring(0)) satisfies T2;
+ 6 │ const t6 = [1, 2] satisfies [number, number];
+
+basic.ts:4:37 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 2 │ const t2 = { a: 1, b: 1 } satisfies I1;
+ 3 │ const t3 = { } satisfies I1;
+ > 4 │ const t4: T1 = { a: "a" } satisfies T1;
+ │ ^^
+ 5 │ const t5 = (m => m.substring(0)) satisfies T2;
+ 6 │ const t6 = [1, 2] satisfies [number, number];
+
+ i An explicit or implicit semicolon is expected here...
+
+ 2 │ const t2 = { a: 1, b: 1 } satisfies I1;
+ 3 │ const t3 = { } satisfies I1;
+ > 4 │ const t4: T1 = { a: "a" } satisfies T1;
+ │ ^^
+ 5 │ const t5 = (m => m.substring(0)) satisfies T2;
+ 6 │ const t6 = [1, 2] satisfies [number, number];
+
+ i ...Which is required to end this statement
+
+ 2 │ const t2 = { a: 1, b: 1 } satisfies I1;
+ 3 │ const t3 = { } satisfies I1;
+ > 4 │ const t4: T1 = { a: "a" } satisfies T1;
+ │ ^^^^^^^^^^^^
+ 5 │ const t5 = (m => m.substring(0)) satisfies T2;
+ 6 │ const t6 = [1, 2] satisfies [number, number];
+
+basic.ts:5:34 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 3 │ const t3 = { } satisfies I1;
+ 4 │ const t4: T1 = { a: "a" } satisfies T1;
+ > 5 │ const t5 = (m => m.substring(0)) satisfies T2;
+ │ ^^^^^^^^^
+ 6 │ const t6 = [1, 2] satisfies [number, number];
+ 7 │ let t7 = { a: 'test' } satisfies A;
+
+ i An explicit or implicit semicolon is expected here...
+
+ 3 │ const t3 = { } satisfies I1;
+ 4 │ const t4: T1 = { a: "a" } satisfies T1;
+ > 5 │ const t5 = (m => m.substring(0)) satisfies T2;
+ │ ^^^^^^^^^
+ 6 │ const t6 = [1, 2] satisfies [number, number];
+ 7 │ let t7 = { a: 'test' } satisfies A;
+
+ i ...Which is required to end this statement
+
+ 3 │ const t3 = { } satisfies I1;
+ 4 │ const t4: T1 = { a: "a" } satisfies T1;
+ > 5 │ const t5 = (m => m.substring(0)) satisfies T2;
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ 6 │ const t6 = [1, 2] satisfies [number, number];
+ 7 │ let t7 = { a: 'test' } satisfies A;
+
+basic.ts:5:44 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 3 │ const t3 = { } satisfies I1;
+ 4 │ const t4: T1 = { a: "a" } satisfies T1;
+ > 5 │ const t5 = (m => m.substring(0)) satisfies T2;
+ │ ^^
+ 6 │ const t6 = [1, 2] satisfies [number, number];
+ 7 │ let t7 = { a: 'test' } satisfies A;
+
+ i An explicit or implicit semicolon is expected here...
+
+ 3 │ const t3 = { } satisfies I1;
+ 4 │ const t4: T1 = { a: "a" } satisfies T1;
+ > 5 │ const t5 = (m => m.substring(0)) satisfies T2;
+ │ ^^
+ 6 │ const t6 = [1, 2] satisfies [number, number];
+ 7 │ let t7 = { a: 'test' } satisfies A;
+
+ i ...Which is required to end this statement
+
+ 3 │ const t3 = { } satisfies I1;
+ 4 │ const t4: T1 = { a: "a" } satisfies T1;
+ > 5 │ const t5 = (m => m.substring(0)) satisfies T2;
+ │ ^^^^^^^^^^^^
+ 6 │ const t6 = [1, 2] satisfies [number, number];
+ 7 │ let t7 = { a: 'test' } satisfies A;
+
+basic.ts:6:19 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 4 │ const t4: T1 = { a: "a" } satisfies T1;
+ 5 │ const t5 = (m => m.substring(0)) satisfies T2;
+ > 6 │ const t6 = [1, 2] satisfies [number, number];
+ │ ^^^^^^^^^
+ 7 │ let t7 = { a: 'test' } satisfies A;
+ 8 │ let t8 = { a: 'test', b: 'test' } satisfies A;
+
+ i An explicit or implicit semicolon is expected here...
+
+ 4 │ const t4: T1 = { a: "a" } satisfies T1;
+ 5 │ const t5 = (m => m.substring(0)) satisfies T2;
+ > 6 │ const t6 = [1, 2] satisfies [number, number];
+ │ ^^^^^^^^^
+ 7 │ let t7 = { a: 'test' } satisfies A;
+ 8 │ let t8 = { a: 'test', b: 'test' } satisfies A;
+
+ i ...Which is required to end this statement
+
+ 4 │ const t4: T1 = { a: "a" } satisfies T1;
+ 5 │ const t5 = (m => m.substring(0)) satisfies T2;
+ > 6 │ const t6 = [1, 2] satisfies [number, number];
+ │ ^^^^^^^^^^^^^^^^^^
+ 7 │ let t7 = { a: 'test' } satisfies A;
+ 8 │ let t8 = { a: 'test', b: 'test' } satisfies A;
+
+basic.ts:7:24 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 5 │ const t5 = (m => m.substring(0)) satisfies T2;
+ 6 │ const t6 = [1, 2] satisfies [number, number];
+ > 7 │ let t7 = { a: 'test' } satisfies A;
+ │ ^^^^^^^^^
+ 8 │ let t8 = { a: 'test', b: 'test' } satisfies A;
+ 9 │
+
+ i An explicit or implicit semicolon is expected here...
+
+ 5 │ const t5 = (m => m.substring(0)) satisfies T2;
+ 6 │ const t6 = [1, 2] satisfies [number, number];
+ > 7 │ let t7 = { a: 'test' } satisfies A;
+ │ ^^^^^^^^^
+ 8 │ let t8 = { a: 'test', b: 'test' } satisfies A;
+ 9 │
+
+ i ...Which is required to end this statement
+
+ 5 │ const t5 = (m => m.substring(0)) satisfies T2;
+ 6 │ const t6 = [1, 2] satisfies [number, number];
+ > 7 │ let t7 = { a: 'test' } satisfies A;
+ │ ^^^^^^^^^^^^^^^^^^^^^^^
+ 8 │ let t8 = { a: 'test', b: 'test' } satisfies A;
+ 9 │
+
+basic.ts:7:34 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 5 │ const t5 = (m => m.substring(0)) satisfies T2;
+ 6 │ const t6 = [1, 2] satisfies [number, number];
+ > 7 │ let t7 = { a: 'test' } satisfies A;
+ │ ^
+ 8 │ let t8 = { a: 'test', b: 'test' } satisfies A;
+ 9 │
+
+ i An explicit or implicit semicolon is expected here...
+
+ 5 │ const t5 = (m => m.substring(0)) satisfies T2;
+ 6 │ const t6 = [1, 2] satisfies [number, number];
+ > 7 │ let t7 = { a: 'test' } satisfies A;
+ │ ^
+ 8 │ let t8 = { a: 'test', b: 'test' } satisfies A;
+ 9 │
+
+ i ...Which is required to end this statement
+
+ 5 │ const t5 = (m => m.substring(0)) satisfies T2;
+ 6 │ const t6 = [1, 2] satisfies [number, number];
+ > 7 │ let t7 = { a: 'test' } satisfies A;
+ │ ^^^^^^^^^^^
+ 8 │ let t8 = { a: 'test', b: 'test' } satisfies A;
+ 9 │
+
+basic.ts:8:35 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 6 │ const t6 = [1, 2] satisfies [number, number];
+ 7 │ let t7 = { a: 'test' } satisfies A;
+ > 8 │ let t8 = { a: 'test', b: 'test' } satisfies A;
+ │ ^^^^^^^^^
+ 9 │
+ 10 │ const p = {
+
+ i An explicit or implicit semicolon is expected here...
+
+ 6 │ const t6 = [1, 2] satisfies [number, number];
+ 7 │ let t7 = { a: 'test' } satisfies A;
+ > 8 │ let t8 = { a: 'test', b: 'test' } satisfies A;
+ │ ^^^^^^^^^
+ 9 │
+ 10 │ const p = {
+
+ i ...Which is required to end this statement
+
+ 6 │ const t6 = [1, 2] satisfies [number, number];
+ 7 │ let t7 = { a: 'test' } satisfies A;
+ > 8 │ let t8 = { a: 'test', b: 'test' } satisfies A;
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ 9 │
+ 10 │ const p = {
+
+basic.ts:8:45 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 6 │ const t6 = [1, 2] satisfies [number, number];
+ 7 │ let t7 = { a: 'test' } satisfies A;
+ > 8 │ let t8 = { a: 'test', b: 'test' } satisfies A;
+ │ ^
+ 9 │
+ 10 │ const p = {
+
+ i An explicit or implicit semicolon is expected here...
+
+ 6 │ const t6 = [1, 2] satisfies [number, number];
+ 7 │ let t7 = { a: 'test' } satisfies A;
+ > 8 │ let t8 = { a: 'test', b: 'test' } satisfies A;
+ │ ^
+ 9 │
+ 10 │ const p = {
+
+ i ...Which is required to end this statement
+
+ 6 │ const t6 = [1, 2] satisfies [number, number];
+ 7 │ let t7 = { a: 'test' } satisfies A;
+ > 8 │ let t8 = { a: 'test', b: 'test' } satisfies A;
+ │ ^^^^^^^^^^^
+ 9 │
+ 10 │ const p = {
+
+basic.ts:13:3 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 11 │ isEven: n => n % 2 === 0,
+ 12 │ isOdd: n => n % 2 === 1
+ > 13 │ } satisfies Predicates;
+ │ ^^^^^^^^^
+ 14 │
+ 15 │ let obj: { f(s: string): void } & Record = {
+
+ i An explicit or implicit semicolon is expected here...
+
+ 11 │ isEven: n => n % 2 === 0,
+ 12 │ isOdd: n => n % 2 === 1
+ > 13 │ } satisfies Predicates;
+ │ ^^^^^^^^^
+ 14 │
+ 15 │ let obj: { f(s: string): void } & Record = {
+
+ i ...Which is required to end this statement
+
+ 8 │ let t8 = { a: 'test', b: 'test' } satisfies A;
+ 9 │
+ > 10 │ const p = {
+ │ ^^^^^^^^^^^
+ > 11 │ isEven: n => n % 2 === 0,
+ > 12 │ isOdd: n => n % 2 === 1
+ > 13 │ } satisfies Predicates;
+ │ ^^
+ 14 │
+ 15 │ let obj: { f(s: string): void } & Record = {
+
+basic.ts:13:13 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 11 │ isEven: n => n % 2 === 0,
+ 12 │ isOdd: n => n % 2 === 1
+ > 13 │ } satisfies Predicates;
+ │ ^^^^^^^^^^
+ 14 │
+ 15 │ let obj: { f(s: string): void } & Record = {
+
+ i An explicit or implicit semicolon is expected here...
+
+ 11 │ isEven: n => n % 2 === 0,
+ 12 │ isOdd: n => n % 2 === 1
+ > 13 │ } satisfies Predicates;
+ │ ^^^^^^^^^^
+ 14 │
+ 15 │ let obj: { f(s: string): void } & Record = {
+
+ i ...Which is required to end this statement
+
+ 11 │ isEven: n => n % 2 === 0,
+ 12 │ isOdd: n => n % 2 === 1
+ > 13 │ } satisfies Predicates;
+ │ ^^^^^^^^^^^^^^^^^^^^
+ 14 │
+ 15 │ let obj: { f(s: string): void } & Record = {
+
+basic.ts:18:3 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 16 │ f(s) { },
+ 17 │ g(s) { }
+ > 18 │ } satisfies { g(s: string): void } & Record;
+ │ ^^^^^^^^^
+ 19 │
+ 20 │ ({ f(x) { } }) satisfies { f(s: string): void };
+
+ i An explicit or implicit semicolon is expected here...
+
+ 16 │ f(s) { },
+ 17 │ g(s) { }
+ > 18 │ } satisfies { g(s: string): void } & Record;
+ │ ^^^^^^^^^
+ 19 │
+ 20 │ ({ f(x) { } }) satisfies { f(s: string): void };
+
+ i ...Which is required to end this statement
+
+ 13 │ } satisfies Predicates;
+ 14 │
+ > 15 │ let obj: { f(s: string): void } & Record = {
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ > 16 │ f(s) { },
+ > 17 │ g(s) { }
+ > 18 │ } satisfies { g(s: string): void } & Record;
+ │ ^^
+ 19 │
+ 20 │ ({ f(x) { } }) satisfies { f(s: string): void };
+
+basic.ts:18:13 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 16 │ f(s) { },
+ 17 │ g(s) { }
+ > 18 │ } satisfies { g(s: string): void } & Record;
+ │ ^
+ 19 │
+ 20 │ ({ f(x) { } }) satisfies { f(s: string): void };
+
+ i An explicit or implicit semicolon is expected here...
+
+ 16 │ f(s) { },
+ 17 │ g(s) { }
+ > 18 │ } satisfies { g(s: string): void } & Record;
+ │ ^
+ 19 │
+ 20 │ ({ f(x) { } }) satisfies { f(s: string): void };
+
+ i ...Which is required to end this statement
+
+ 16 │ f(s) { },
+ 17 │ g(s) { }
+ > 18 │ } satisfies { g(s: string): void } & Record;
+ │ ^^^^^^^^^^^
+ 19 │
+ 20 │ ({ f(x) { } }) satisfies { f(s: string): void };
+
+basic.ts:18:18 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected `,` but instead found `:`
+
+ 16 │ f(s) { },
+ 17 │ g(s) { }
+ > 18 │ } satisfies { g(s: string): void } & Record;
+ │ ^
+ 19 │
+ 20 │ ({ f(x) { } }) satisfies { f(s: string): void };
+
+ i Remove :
+
+basic.ts:18:27 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 16 │ f(s) { },
+ 17 │ g(s) { }
+ > 18 │ } satisfies { g(s: string): void } & Record;
+ │ ^
+ 19 │
+ 20 │ ({ f(x) { } }) satisfies { f(s: string): void };
+
+ i An explicit or implicit semicolon is expected here...
+
+ 16 │ f(s) { },
+ 17 │ g(s) { }
+ > 18 │ } satisfies { g(s: string): void } & Record;
+ │ ^
+ 19 │
+ 20 │ ({ f(x) { } }) satisfies { f(s: string): void };
+
+ i ...Which is required to end this statement
+
+ 16 │ f(s) { },
+ 17 │ g(s) { }
+ > 18 │ } satisfies { g(s: string): void } & Record;
+ │ ^^^^^^^^^^^^^
+ 19 │
+ 20 │ ({ f(x) { } }) satisfies { f(s: string): void };
+
+basic.ts:18:36 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected a statement but instead found '& Record'
+
+ 16 │ f(s) { },
+ 17 │ g(s) { }
+ > 18 │ } satisfies { g(s: string): void } & Record;
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^
+ 19 │
+ 20 │ ({ f(x) { } }) satisfies { f(s: string): void };
+
+ i Expected a statement here
+
+ 16 │ f(s) { },
+ 17 │ g(s) { }
+ > 18 │ } satisfies { g(s: string): void } & Record;
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^
+ 19 │
+ 20 │ ({ f(x) { } }) satisfies { f(s: string): void };
+
+basic.ts:20:16 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 18 │ } satisfies { g(s: string): void } & Record;
+ 19 │
+ > 20 │ ({ f(x) { } }) satisfies { f(s: string): void };
+ │ ^^^^^^^^^
+ 21 │
+ 22 │ const car = {
+
+ i An explicit or implicit semicolon is expected here...
+
+ 18 │ } satisfies { g(s: string): void } & Record;
+ 19 │
+ > 20 │ ({ f(x) { } }) satisfies { f(s: string): void };
+ │ ^^^^^^^^^
+ 21 │
+ 22 │ const car = {
+
+ i ...Which is required to end this statement
+
+ 18 │ } satisfies { g(s: string): void } & Record;
+ 19 │
+ > 20 │ ({ f(x) { } }) satisfies { f(s: string): void };
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^
+ 21 │
+ 22 │ const car = {
+
+basic.ts:20:26 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 18 │ } satisfies { g(s: string): void } & Record;
+ 19 │
+ > 20 │ ({ f(x) { } }) satisfies { f(s: string): void };
+ │ ^
+ 21 │
+ 22 │ const car = {
+
+ i An explicit or implicit semicolon is expected here...
+
+ 18 │ } satisfies { g(s: string): void } & Record;
+ 19 │
+ > 20 │ ({ f(x) { } }) satisfies { f(s: string): void };
+ │ ^
+ 21 │
+ 22 │ const car = {
+
+ i ...Which is required to end this statement
+
+ 18 │ } satisfies { g(s: string): void } & Record;
+ 19 │
+ > 20 │ ({ f(x) { } }) satisfies { f(s: string): void };
+ │ ^^^^^^^^^^^
+ 21 │
+ 22 │ const car = {
+
+basic.ts:20:31 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected `,` but instead found `:`
+
+ 18 │ } satisfies { g(s: string): void } & Record;
+ 19 │
+ > 20 │ ({ f(x) { } }) satisfies { f(s: string): void };
+ │ ^
+ 21 │
+ 22 │ const car = {
+
+ i Remove :
+
+basic.ts:20:40 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 18 │ } satisfies { g(s: string): void } & Record;
+ 19 │
+ > 20 │ ({ f(x) { } }) satisfies { f(s: string): void };
+ │ ^
+ 21 │
+ 22 │ const car = {
+
+ i An explicit or implicit semicolon is expected here...
+
+ 18 │ } satisfies { g(s: string): void } & Record;
+ 19 │
+ > 20 │ ({ f(x) { } }) satisfies { f(s: string): void };
+ │ ^
+ 21 │
+ 22 │ const car = {
+
+ i ...Which is required to end this statement
+
+ 18 │ } satisfies { g(s: string): void } & Record;
+ 19 │
+ > 20 │ ({ f(x) { } }) satisfies { f(s: string): void };
+ │ ^^^^^^^^^^^^^
+ 21 │
+ 22 │ const car = {
+
+basic.ts:28:3 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 26 │ },
+ 27 │ stop() { }
+ > 28 │ } satisfies Movable & Record;
+ │ ^^^^^^^^^
+ 29 │
+ 30 │ var v = undefined satisfies 1;
+
+ i An explicit or implicit semicolon is expected here...
+
+ 26 │ },
+ 27 │ stop() { }
+ > 28 │ } satisfies Movable & Record;
+ │ ^^^^^^^^^
+ 29 │
+ 30 │ var v = undefined satisfies 1;
+
+ i ...Which is required to end this statement
+
+ 20 │ ({ f(x) { } }) satisfies { f(s: string): void };
+ 21 │
+ > 22 │ const car = {
+ │ ^^^^^^^^^^^^^
+ > 23 │ start() { },
+ ...
+ > 27 │ stop() { }
+ > 28 │ } satisfies Movable & Record;
+ │ ^^
+ 29 │
+ 30 │ var v = undefined satisfies 1;
+
+basic.ts:28:13 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 26 │ },
+ 27 │ stop() { }
+ > 28 │ } satisfies Movable & Record;
+ │ ^^^^^^^
+ 29 │
+ 30 │ var v = undefined satisfies 1;
+
+ i An explicit or implicit semicolon is expected here...
+
+ 26 │ },
+ 27 │ stop() { }
+ > 28 │ } satisfies Movable & Record;
+ │ ^^^^^^^
+ 29 │
+ 30 │ var v = undefined satisfies 1;
+
+ i ...Which is required to end this statement
+
+ 26 │ },
+ 27 │ stop() { }
+ > 28 │ } satisfies Movable & Record;
+ │ ^^^^^^^^^^^^^^^^^
+ 29 │
+ 30 │ var v = undefined satisfies 1;
+
+basic.ts:30:19 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 28 │ } satisfies Movable & Record;
+ 29 │
+ > 30 │ var v = undefined satisfies 1;
+ │ ^^^^^^^^^
+ 31 │
+
+ i An explicit or implicit semicolon is expected here...
+
+ 28 │ } satisfies Movable & Record;
+ 29 │
+ > 30 │ var v = undefined satisfies 1;
+ │ ^^^^^^^^^
+ 31 │
+
+ i ...Which is required to end this statement
+
+ 28 │ } satisfies Movable & Record;
+ 29 │
+ > 30 │ var v = undefined satisfies 1;
+ │ ^^^^^^^^^^^^^^^^^^
+ 31 │
+
+basic.ts:30:29 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 28 │ } satisfies Movable & Record;
+ 29 │
+ > 30 │ var v = undefined satisfies 1;
+ │ ^
+ 31 │
+
+ i An explicit or implicit semicolon is expected here...
+
+ 28 │ } satisfies Movable & Record;
+ 29 │
+ > 30 │ var v = undefined satisfies 1;
+ │ ^
+ 31 │
+
+ i ...Which is required to end this statement
+
+ 28 │ } satisfies Movable & Record;
+ 29 │
+ > 30 │ var v = undefined satisfies 1;
+ │ ^^^^^^^^^^^
+ 31 │
+
+
+```
+
+
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/comments-unstable.ts b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/comments-unstable.ts
new file mode 100644
index 00000000000..0f658aa5460
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/comments-unstable.ts
@@ -0,0 +1,7 @@
+const t1 = {
+ prop1: 1,
+ prop2: 2,
+ prop3: 3
+} satisfies
+// Comment
+Record;
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/comments-unstable.ts.prettier-snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/comments-unstable.ts.prettier-snap
new file mode 100644
index 00000000000..28cd18570ad
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/comments-unstable.ts.prettier-snap
@@ -0,0 +1,6 @@
+const t1 = {
+ prop1: 1,
+ prop2: 2,
+ prop3: 3,
+} satisfies // Comment
+Record;
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/comments-unstable.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/comments-unstable.ts.snap
new file mode 100644
index 00000000000..a7eefe262a2
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/comments-unstable.ts.snap
@@ -0,0 +1,87 @@
+---
+source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/satisfies-operators/comments-unstable.ts
+---
+
+# Input
+
+```js
+const t1 = {
+ prop1: 1,
+ prop2: 2,
+ prop3: 3
+} satisfies
+// Comment
+Record;
+```
+
+
+# Prettier differences
+
+```diff
+--- Prettier
++++ Rome
+@@ -2,5 +2,7 @@
+ prop1: 1,
+ prop2: 2,
+ prop3: 3,
+-} satisfies // Comment
++};
++satisfies;
++// Comment
+ Record;
+```
+
+# Output
+
+```js
+const t1 = {
+ prop1: 1,
+ prop2: 2,
+ prop3: 3,
+};
+satisfies;
+// Comment
+Record;
+```
+
+
+# Errors
+```
+comments-unstable.ts:5:3 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 3 │ prop2: 2,
+ 4 │ prop3: 3
+ > 5 │ } satisfies
+ │ ^^^^^^^^^
+ 6 │ // Comment
+ 7 │ Record;
+
+ i An explicit or implicit semicolon is expected here...
+
+ 3 │ prop2: 2,
+ 4 │ prop3: 3
+ > 5 │ } satisfies
+ │ ^^^^^^^^^
+ 6 │ // Comment
+ 7 │ Record;
+
+ i ...Which is required to end this statement
+
+ > 1 │ const t1 = {
+ │ ^^^^^^^^^^^^
+ > 2 │ prop1: 1,
+ > 3 │ prop2: 2,
+ > 4 │ prop3: 3
+ > 5 │ } satisfies
+ │ ^^
+ 6 │ // Comment
+ 7 │ Record;
+
+
+```
+
+
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/comments.ts b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/comments.ts
new file mode 100644
index 00000000000..9ab0ae58c20
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/comments.ts
@@ -0,0 +1,3 @@
+const t2 = {} /* comment */ satisfies {};
+const t3 = {} satisfies /* comment */ {};
+const t4 = {} /* comment1 */ satisfies /* comment2 */ {};
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/comments.ts.prettier-snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/comments.ts.prettier-snap
new file mode 100644
index 00000000000..9ab0ae58c20
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/comments.ts.prettier-snap
@@ -0,0 +1,3 @@
+const t2 = {} /* comment */ satisfies {};
+const t3 = {} satisfies /* comment */ {};
+const t4 = {} /* comment1 */ satisfies /* comment2 */ {};
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/comments.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/comments.ts.snap
new file mode 100644
index 00000000000..8ed67f232ab
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/comments.ts.snap
@@ -0,0 +1,212 @@
+---
+source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/satisfies-operators/comments.ts
+---
+
+# Input
+
+```js
+const t2 = {} /* comment */ satisfies {};
+const t3 = {} satisfies /* comment */ {};
+const t4 = {} /* comment1 */ satisfies /* comment2 */ {};
+```
+
+
+# Prettier differences
+
+```diff
+--- Prettier
++++ Rome
+@@ -1,3 +1,12 @@
+-const t2 = {} /* comment */ satisfies {};
+-const t3 = {} satisfies /* comment */ {};
+-const t4 = {} /* comment1 */ satisfies /* comment2 */ {};
++const t2 = {}; /* comment */
++satisfies;
++{
++}
++const t3 = {};
++satisfies; /* comment */
++{
++}
++const t4 = {}; /* comment1 */
++satisfies; /* comment2 */
++{
++}
+```
+
+# Output
+
+```js
+const t2 = {}; /* comment */
+satisfies;
+{
+}
+const t3 = {};
+satisfies; /* comment */
+{
+}
+const t4 = {}; /* comment1 */
+satisfies; /* comment2 */
+{
+}
+```
+
+
+# Errors
+```
+comments.ts:1:29 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ > 1 │ const t2 = {} /* comment */ satisfies {};
+ │ ^^^^^^^^^
+ 2 │ const t3 = {} satisfies /* comment */ {};
+ 3 │ const t4 = {} /* comment1 */ satisfies /* comment2 */ {};
+
+ i An explicit or implicit semicolon is expected here...
+
+ > 1 │ const t2 = {} /* comment */ satisfies {};
+ │ ^^^^^^^^^
+ 2 │ const t3 = {} satisfies /* comment */ {};
+ 3 │ const t4 = {} /* comment1 */ satisfies /* comment2 */ {};
+
+ i ...Which is required to end this statement
+
+ > 1 │ const t2 = {} /* comment */ satisfies {};
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ 2 │ const t3 = {} satisfies /* comment */ {};
+ 3 │ const t4 = {} /* comment1 */ satisfies /* comment2 */ {};
+
+comments.ts:1:39 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ > 1 │ const t2 = {} /* comment */ satisfies {};
+ │ ^
+ 2 │ const t3 = {} satisfies /* comment */ {};
+ 3 │ const t4 = {} /* comment1 */ satisfies /* comment2 */ {};
+
+ i An explicit or implicit semicolon is expected here...
+
+ > 1 │ const t2 = {} /* comment */ satisfies {};
+ │ ^
+ 2 │ const t3 = {} satisfies /* comment */ {};
+ 3 │ const t4 = {} /* comment1 */ satisfies /* comment2 */ {};
+
+ i ...Which is required to end this statement
+
+ > 1 │ const t2 = {} /* comment */ satisfies {};
+ │ ^^^^^^^^^^^
+ 2 │ const t3 = {} satisfies /* comment */ {};
+ 3 │ const t4 = {} /* comment1 */ satisfies /* comment2 */ {};
+
+comments.ts:2:15 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 1 │ const t2 = {} /* comment */ satisfies {};
+ > 2 │ const t3 = {} satisfies /* comment */ {};
+ │ ^^^^^^^^^
+ 3 │ const t4 = {} /* comment1 */ satisfies /* comment2 */ {};
+ 4 │
+
+ i An explicit or implicit semicolon is expected here...
+
+ 1 │ const t2 = {} /* comment */ satisfies {};
+ > 2 │ const t3 = {} satisfies /* comment */ {};
+ │ ^^^^^^^^^
+ 3 │ const t4 = {} /* comment1 */ satisfies /* comment2 */ {};
+ 4 │
+
+ i ...Which is required to end this statement
+
+ 1 │ const t2 = {} /* comment */ satisfies {};
+ > 2 │ const t3 = {} satisfies /* comment */ {};
+ │ ^^^^^^^^^^^^^^
+ 3 │ const t4 = {} /* comment1 */ satisfies /* comment2 */ {};
+ 4 │
+
+comments.ts:2:39 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 1 │ const t2 = {} /* comment */ satisfies {};
+ > 2 │ const t3 = {} satisfies /* comment */ {};
+ │ ^
+ 3 │ const t4 = {} /* comment1 */ satisfies /* comment2 */ {};
+ 4 │
+
+ i An explicit or implicit semicolon is expected here...
+
+ 1 │ const t2 = {} /* comment */ satisfies {};
+ > 2 │ const t3 = {} satisfies /* comment */ {};
+ │ ^
+ 3 │ const t4 = {} /* comment1 */ satisfies /* comment2 */ {};
+ 4 │
+
+ i ...Which is required to end this statement
+
+ 1 │ const t2 = {} /* comment */ satisfies {};
+ > 2 │ const t3 = {} satisfies /* comment */ {};
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^
+ 3 │ const t4 = {} /* comment1 */ satisfies /* comment2 */ {};
+ 4 │
+
+comments.ts:3:30 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 1 │ const t2 = {} /* comment */ satisfies {};
+ 2 │ const t3 = {} satisfies /* comment */ {};
+ > 3 │ const t4 = {} /* comment1 */ satisfies /* comment2 */ {};
+ │ ^^^^^^^^^
+ 4 │
+
+ i An explicit or implicit semicolon is expected here...
+
+ 1 │ const t2 = {} /* comment */ satisfies {};
+ 2 │ const t3 = {} satisfies /* comment */ {};
+ > 3 │ const t4 = {} /* comment1 */ satisfies /* comment2 */ {};
+ │ ^^^^^^^^^
+ 4 │
+
+ i ...Which is required to end this statement
+
+ 1 │ const t2 = {} /* comment */ satisfies {};
+ 2 │ const t3 = {} satisfies /* comment */ {};
+ > 3 │ const t4 = {} /* comment1 */ satisfies /* comment2 */ {};
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ 4 │
+
+comments.ts:3:55 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 1 │ const t2 = {} /* comment */ satisfies {};
+ 2 │ const t3 = {} satisfies /* comment */ {};
+ > 3 │ const t4 = {} /* comment1 */ satisfies /* comment2 */ {};
+ │ ^
+ 4 │
+
+ i An explicit or implicit semicolon is expected here...
+
+ 1 │ const t2 = {} /* comment */ satisfies {};
+ 2 │ const t3 = {} satisfies /* comment */ {};
+ > 3 │ const t4 = {} /* comment1 */ satisfies /* comment2 */ {};
+ │ ^
+ 4 │
+
+ i ...Which is required to end this statement
+
+ 1 │ const t2 = {} /* comment */ satisfies {};
+ 2 │ const t3 = {} satisfies /* comment */ {};
+ > 3 │ const t4 = {} /* comment1 */ satisfies /* comment2 */ {};
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^
+ 4 │
+
+
+```
+
+
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/export-default-as.ts b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/export-default-as.ts
new file mode 100644
index 00000000000..6d6905150d8
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/export-default-as.ts
@@ -0,0 +1 @@
+export default (function log() {} satisfies typeof console.log)
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/export-default-as.ts.prettier-snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/export-default-as.ts.prettier-snap
new file mode 100644
index 00000000000..f3d0c69aa33
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/export-default-as.ts.prettier-snap
@@ -0,0 +1 @@
+export default (function log() {} satisfies typeof console.log);
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/export-default-as.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/export-default-as.ts.snap
new file mode 100644
index 00000000000..55ec11a1784
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/export-default-as.ts.snap
@@ -0,0 +1,92 @@
+---
+source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/satisfies-operators/export-default-as.ts
+---
+
+# Input
+
+```js
+export default (function log() {} satisfies typeof console.log)
+```
+
+
+# Prettier differences
+
+```diff
+--- Prettier
++++ Rome
+@@ -1 +1,4 @@
+-export default (function log() {} satisfies typeof console.log);
++export default (function log() {}
++satisfies;
++typeof console.log;
++)
+```
+
+# Output
+
+```js
+export default (function log() {}
+satisfies;
+typeof console.log;
+)
+```
+
+
+# Errors
+```
+export-default-as.ts:1:35 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected `)` but instead found `satisfies`
+
+ > 1 │ export default (function log() {} satisfies typeof console.log)
+ │ ^^^^^^^^^
+ 2 │
+
+ i Remove satisfies
+
+export-default-as.ts:1:45 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ > 1 │ export default (function log() {} satisfies typeof console.log)
+ │ ^^^^^^
+ 2 │
+
+ i An explicit or implicit semicolon is expected here...
+
+ > 1 │ export default (function log() {} satisfies typeof console.log)
+ │ ^^^^^^
+ 2 │
+
+ i ...Which is required to end this statement
+
+ > 1 │ export default (function log() {} satisfies typeof console.log)
+ │ ^^^^^^^^^^^^^^^^
+ 2 │
+
+export-default-as.ts:1:63 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ > 1 │ export default (function log() {} satisfies typeof console.log)
+ │ ^
+ 2 │
+
+ i An explicit or implicit semicolon is expected here...
+
+ > 1 │ export default (function log() {} satisfies typeof console.log)
+ │ ^
+ 2 │
+
+ i ...Which is required to end this statement
+
+ > 1 │ export default (function log() {} satisfies typeof console.log)
+ │ ^^^^^^^^^^^^^^^^^^^
+ 2 │
+
+
+```
+
+
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/gt-lt.ts b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/gt-lt.ts
new file mode 100644
index 00000000000..bdc95deefbe
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/gt-lt.ts
@@ -0,0 +1,2 @@
+x satisfies boolean <= y; // (x satisfies boolean) <= y;
+x satisfies boolean ?? y; // (x satisfies boolean) ?? y;
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/gt-lt.ts.prettier-snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/gt-lt.ts.prettier-snap
new file mode 100644
index 00000000000..5be64b36aa6
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/gt-lt.ts.prettier-snap
@@ -0,0 +1,2 @@
+(x satisfies boolean) <= y; // (x satisfies boolean) <= y;
+(x satisfies boolean) ?? y; // (x satisfies boolean) ?? y;
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/gt-lt.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/gt-lt.ts.snap
new file mode 100644
index 00000000000..636d4d02f49
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/gt-lt.ts.snap
@@ -0,0 +1,140 @@
+---
+source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/satisfies-operators/gt-lt.ts
+---
+
+# Input
+
+```js
+x satisfies boolean <= y; // (x satisfies boolean) <= y;
+x satisfies boolean ?? y; // (x satisfies boolean) ?? y;
+```
+
+
+# Prettier differences
+
+```diff
+--- Prettier
++++ Rome
+@@ -1,2 +1,6 @@
+-(x satisfies boolean) <= y; // (x satisfies boolean) <= y;
+-(x satisfies boolean) ?? y; // (x satisfies boolean) ?? y;
++x;
++satisfies;
++boolean <= y; // (x satisfies boolean) <= y;
++x;
++satisfies;
++boolean ?? y; // (x satisfies boolean) ?? y;
+```
+
+# Output
+
+```js
+x;
+satisfies;
+boolean <= y; // (x satisfies boolean) <= y;
+x;
+satisfies;
+boolean ?? y; // (x satisfies boolean) ?? y;
+```
+
+
+# Errors
+```
+gt-lt.ts:1:3 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ > 1 │ x satisfies boolean <= y; // (x satisfies boolean) <= y;
+ │ ^^^^^^^^^
+ 2 │ x satisfies boolean ?? y; // (x satisfies boolean) ?? y;
+ 3 │
+
+ i An explicit or implicit semicolon is expected here...
+
+ > 1 │ x satisfies boolean <= y; // (x satisfies boolean) <= y;
+ │ ^^^^^^^^^
+ 2 │ x satisfies boolean ?? y; // (x satisfies boolean) ?? y;
+ 3 │
+
+ i ...Which is required to end this statement
+
+ > 1 │ x satisfies boolean <= y; // (x satisfies boolean) <= y;
+ │ ^^^^^^^^^^^
+ 2 │ x satisfies boolean ?? y; // (x satisfies boolean) ?? y;
+ 3 │
+
+gt-lt.ts:1:13 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ > 1 │ x satisfies boolean <= y; // (x satisfies boolean) <= y;
+ │ ^^^^^^^
+ 2 │ x satisfies boolean ?? y; // (x satisfies boolean) ?? y;
+ 3 │
+
+ i An explicit or implicit semicolon is expected here...
+
+ > 1 │ x satisfies boolean <= y; // (x satisfies boolean) <= y;
+ │ ^^^^^^^
+ 2 │ x satisfies boolean ?? y; // (x satisfies boolean) ?? y;
+ 3 │
+
+ i ...Which is required to end this statement
+
+ > 1 │ x satisfies boolean <= y; // (x satisfies boolean) <= y;
+ │ ^^^^^^^^^^^^^^^^^
+ 2 │ x satisfies boolean ?? y; // (x satisfies boolean) ?? y;
+ 3 │
+
+gt-lt.ts:2:3 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 1 │ x satisfies boolean <= y; // (x satisfies boolean) <= y;
+ > 2 │ x satisfies boolean ?? y; // (x satisfies boolean) ?? y;
+ │ ^^^^^^^^^
+ 3 │
+
+ i An explicit or implicit semicolon is expected here...
+
+ 1 │ x satisfies boolean <= y; // (x satisfies boolean) <= y;
+ > 2 │ x satisfies boolean ?? y; // (x satisfies boolean) ?? y;
+ │ ^^^^^^^^^
+ 3 │
+
+ i ...Which is required to end this statement
+
+ 1 │ x satisfies boolean <= y; // (x satisfies boolean) <= y;
+ > 2 │ x satisfies boolean ?? y; // (x satisfies boolean) ?? y;
+ │ ^^^^^^^^^^^
+ 3 │
+
+gt-lt.ts:2:13 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 1 │ x satisfies boolean <= y; // (x satisfies boolean) <= y;
+ > 2 │ x satisfies boolean ?? y; // (x satisfies boolean) ?? y;
+ │ ^^^^^^^
+ 3 │
+
+ i An explicit or implicit semicolon is expected here...
+
+ 1 │ x satisfies boolean <= y; // (x satisfies boolean) <= y;
+ > 2 │ x satisfies boolean ?? y; // (x satisfies boolean) ?? y;
+ │ ^^^^^^^
+ 3 │
+
+ i ...Which is required to end this statement
+
+ 1 │ x satisfies boolean <= y; // (x satisfies boolean) <= y;
+ > 2 │ x satisfies boolean ?? y; // (x satisfies boolean) ?? y;
+ │ ^^^^^^^^^^^^^^^^^
+ 3 │
+
+
+```
+
+
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/hug-args.ts b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/hug-args.ts
new file mode 100644
index 00000000000..c35cf66fb52
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/hug-args.ts
@@ -0,0 +1,6 @@
+window.postMessage(
+ {
+ context: item.context,
+ topic: item.topic
+ } satisfies IActionMessage
+ );
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/hug-args.ts.prettier-snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/hug-args.ts.prettier-snap
new file mode 100644
index 00000000000..247aefd7cd4
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/hug-args.ts.prettier-snap
@@ -0,0 +1,4 @@
+window.postMessage({
+ context: item.context,
+ topic: item.topic,
+} satisfies IActionMessage);
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/hug-args.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/hug-args.ts.snap
new file mode 100644
index 00000000000..8fc4cbc083a
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/hug-args.ts.snap
@@ -0,0 +1,80 @@
+---
+source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/satisfies-operators/hug-args.ts
+---
+
+# Input
+
+```js
+window.postMessage(
+ {
+ context: item.context,
+ topic: item.topic
+ } satisfies IActionMessage
+ );
+```
+
+
+# Prettier differences
+
+```diff
+--- Prettier
++++ Rome
+@@ -1,4 +1,6 @@
+-window.postMessage({
+- context: item.context,
+- topic: item.topic,
+-} satisfies IActionMessage);
++window.postMessage(
++ {
++ context: item.context,
++ topic: item.topic
++ } satisfies IActionMessage
++ );
+```
+
+# Output
+
+```js
+window.postMessage(
+ {
+ context: item.context,
+ topic: item.topic
+ } satisfies IActionMessage
+ );
+```
+
+
+# Errors
+```
+hug-args.ts:5:7 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected `,` but instead found `satisfies`
+
+ 3 │ context: item.context,
+ 4 │ topic: item.topic
+ > 5 │ } satisfies IActionMessage
+ │ ^^^^^^^^^
+ 6 │ );
+ 7 │
+
+ i Remove satisfies
+
+hug-args.ts:5:17 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected `,` but instead found `IActionMessage`
+
+ 3 │ context: item.context,
+ 4 │ topic: item.topic
+ > 5 │ } satisfies IActionMessage
+ │ ^^^^^^^^^^^^^^
+ 6 │ );
+ 7 │
+
+ i Remove IActionMessage
+
+
+```
+
+
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/lhs.ts b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/lhs.ts
new file mode 100644
index 00000000000..fbdbe1c9106
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/lhs.ts
@@ -0,0 +1,5 @@
+(a satisfies number) = 42;
+({ a: (b satisfies any) = 2000 } = x);
+(this.selectorElem satisfies any) = this.multiselectWidget = this.initialValues = undefined;
+(this.configuration satisfies any) = (this.editor satisfies any) = (this
+ .editorBody satisfies any) = undefined;
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/lhs.ts.prettier-snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/lhs.ts.prettier-snap
new file mode 100644
index 00000000000..5a8548001f6
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/lhs.ts.prettier-snap
@@ -0,0 +1,10 @@
+(a satisfies number) = 42;
+({ a: (b satisfies any) = 2000 } = x);
+(this.selectorElem satisfies any) =
+ this.multiselectWidget =
+ this.initialValues =
+ undefined;
+(this.configuration satisfies any) =
+ (this.editor satisfies any) =
+ (this.editorBody satisfies any) =
+ undefined;
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/lhs.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/lhs.ts.snap
new file mode 100644
index 00000000000..0efa5d3cfc7
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/lhs.ts.snap
@@ -0,0 +1,342 @@
+---
+source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/satisfies-operators/lhs.ts
+---
+
+# Input
+
+```js
+(a satisfies number) = 42;
+({ a: (b satisfies any) = 2000 } = x);
+(this.selectorElem satisfies any) = this.multiselectWidget = this.initialValues = undefined;
+(this.configuration satisfies any) = (this.editor satisfies any) = (this
+ .editorBody satisfies any) = undefined;
+```
+
+
+# Prettier differences
+
+```diff
+--- Prettier
++++ Rome
+@@ -1,10 +1,15 @@
+-(a satisfies number) = 42;
+-({ a: (b satisfies any) = 2000 } = x);
+-(this.selectorElem satisfies any) =
+- this.multiselectWidget =
+- this.initialValues =
+- undefined;
+-(this.configuration satisfies any) =
+- (this.editor satisfies any) =
+- (this.editorBody satisfies any) =
+- undefined;
++(a
++satisfies;
++number;
++) = 42
++({ a: (b satisfies any) = 2000;
++} = x)
++(this.selectorElem
++satisfies;
++any;
++) = this.multiselectWidget = this.initialValues = undefined
++(this.configuration
++satisfies;
++any;
++) = (this.editor satisfies any) = (this
++ .editorBody satisfies any) = undefined
+```
+
+# Output
+
+```js
+(a
+satisfies;
+number;
+) = 42
+({ a: (b satisfies any) = 2000;
+} = x)
+(this.selectorElem
+satisfies;
+any;
+) = this.multiselectWidget = this.initialValues = undefined
+(this.configuration
+satisfies;
+any;
+) = (this.editor satisfies any) = (this
+ .editorBody satisfies any) = undefined
+```
+
+
+# Errors
+```
+lhs.ts:1:4 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected `)` but instead found `satisfies`
+
+ > 1 │ (a satisfies number) = 42;
+ │ ^^^^^^^^^
+ 2 │ ({ a: (b satisfies any) = 2000 } = x);
+ 3 │ (this.selectorElem satisfies any) = this.multiselectWidget = this.initialValues = undefined;
+
+ i Remove satisfies
+
+lhs.ts:1:14 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ > 1 │ (a satisfies number) = 42;
+ │ ^^^^^^
+ 2 │ ({ a: (b satisfies any) = 2000 } = x);
+ 3 │ (this.selectorElem satisfies any) = this.multiselectWidget = this.initialValues = undefined;
+
+ i An explicit or implicit semicolon is expected here...
+
+ > 1 │ (a satisfies number) = 42;
+ │ ^^^^^^
+ 2 │ ({ a: (b satisfies any) = 2000 } = x);
+ 3 │ (this.selectorElem satisfies any) = this.multiselectWidget = this.initialValues = undefined;
+
+ i ...Which is required to end this statement
+
+ > 1 │ (a satisfies number) = 42;
+ │ ^^^^^^^^^^^^^^^^
+ 2 │ ({ a: (b satisfies any) = 2000 } = x);
+ 3 │ (this.selectorElem satisfies any) = this.multiselectWidget = this.initialValues = undefined;
+
+lhs.ts:1:20 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ > 1 │ (a satisfies number) = 42;
+ │ ^
+ 2 │ ({ a: (b satisfies any) = 2000 } = x);
+ 3 │ (this.selectorElem satisfies any) = this.multiselectWidget = this.initialValues = undefined;
+
+ i An explicit or implicit semicolon is expected here...
+
+ > 1 │ (a satisfies number) = 42;
+ │ ^
+ 2 │ ({ a: (b satisfies any) = 2000 } = x);
+ 3 │ (this.selectorElem satisfies any) = this.multiselectWidget = this.initialValues = undefined;
+
+ i ...Which is required to end this statement
+
+ > 1 │ (a satisfies number) = 42;
+ │ ^^^^^^^
+ 2 │ ({ a: (b satisfies any) = 2000 } = x);
+ 3 │ (this.selectorElem satisfies any) = this.multiselectWidget = this.initialValues = undefined;
+
+lhs.ts:2:10 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected `)` but instead found `satisfies`
+
+ 1 │ (a satisfies number) = 42;
+ > 2 │ ({ a: (b satisfies any) = 2000 } = x);
+ │ ^^^^^^^^^
+ 3 │ (this.selectorElem satisfies any) = this.multiselectWidget = this.initialValues = undefined;
+ 4 │ (this.configuration satisfies any) = (this.editor satisfies any) = (this
+
+ i Remove satisfies
+
+lhs.ts:2:20 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected `,` but instead found `any`
+
+ 1 │ (a satisfies number) = 42;
+ > 2 │ ({ a: (b satisfies any) = 2000 } = x);
+ │ ^^^
+ 3 │ (this.selectorElem satisfies any) = this.multiselectWidget = this.initialValues = undefined;
+ 4 │ (this.configuration satisfies any) = (this.editor satisfies any) = (this
+
+ i Remove any
+
+lhs.ts:2:23 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected `,` but instead found `)`
+
+ 1 │ (a satisfies number) = 42;
+ > 2 │ ({ a: (b satisfies any) = 2000 } = x);
+ │ ^
+ 3 │ (this.selectorElem satisfies any) = this.multiselectWidget = this.initialValues = undefined;
+ 4 │ (this.configuration satisfies any) = (this.editor satisfies any) = (this
+
+ i Remove )
+
+lhs.ts:2:2 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Invalid assignment to `{ a: (b satisfies any`
+
+ 1 │ (a satisfies number) = 42;
+ > 2 │ ({ a: (b satisfies any) = 2000 } = x);
+ │ ^^^^^^^^^^^^^^^^^^^^^
+ 3 │ (this.selectorElem satisfies any) = this.multiselectWidget = this.initialValues = undefined;
+ 4 │ (this.configuration satisfies any) = (this.editor satisfies any) = (this
+
+ i This expression cannot be assigned to
+
+lhs.ts:2:32 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected a statement but instead found '} = x)'
+
+ 1 │ (a satisfies number) = 42;
+ > 2 │ ({ a: (b satisfies any) = 2000 } = x);
+ │ ^^^^^^
+ 3 │ (this.selectorElem satisfies any) = this.multiselectWidget = this.initialValues = undefined;
+ 4 │ (this.configuration satisfies any) = (this.editor satisfies any) = (this
+
+ i Expected a statement here
+
+ 1 │ (a satisfies number) = 42;
+ > 2 │ ({ a: (b satisfies any) = 2000 } = x);
+ │ ^^^^^^
+ 3 │ (this.selectorElem satisfies any) = this.multiselectWidget = this.initialValues = undefined;
+ 4 │ (this.configuration satisfies any) = (this.editor satisfies any) = (this
+
+lhs.ts:3:20 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected `)` but instead found `satisfies`
+
+ 1 │ (a satisfies number) = 42;
+ 2 │ ({ a: (b satisfies any) = 2000 } = x);
+ > 3 │ (this.selectorElem satisfies any) = this.multiselectWidget = this.initialValues = undefined;
+ │ ^^^^^^^^^
+ 4 │ (this.configuration satisfies any) = (this.editor satisfies any) = (this
+ 5 │ .editorBody satisfies any) = undefined;
+
+ i Remove satisfies
+
+lhs.ts:3:30 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 1 │ (a satisfies number) = 42;
+ 2 │ ({ a: (b satisfies any) = 2000 } = x);
+ > 3 │ (this.selectorElem satisfies any) = this.multiselectWidget = this.initialValues = undefined;
+ │ ^^^
+ 4 │ (this.configuration satisfies any) = (this.editor satisfies any) = (this
+ 5 │ .editorBody satisfies any) = undefined;
+
+ i An explicit or implicit semicolon is expected here...
+
+ 1 │ (a satisfies number) = 42;
+ 2 │ ({ a: (b satisfies any) = 2000 } = x);
+ > 3 │ (this.selectorElem satisfies any) = this.multiselectWidget = this.initialValues = undefined;
+ │ ^^^
+ 4 │ (this.configuration satisfies any) = (this.editor satisfies any) = (this
+ 5 │ .editorBody satisfies any) = undefined;
+
+ i ...Which is required to end this statement
+
+ 1 │ (a satisfies number) = 42;
+ 2 │ ({ a: (b satisfies any) = 2000 } = x);
+ > 3 │ (this.selectorElem satisfies any) = this.multiselectWidget = this.initialValues = undefined;
+ │ ^^^^^^^^^^^^^
+ 4 │ (this.configuration satisfies any) = (this.editor satisfies any) = (this
+ 5 │ .editorBody satisfies any) = undefined;
+
+lhs.ts:3:33 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 1 │ (a satisfies number) = 42;
+ 2 │ ({ a: (b satisfies any) = 2000 } = x);
+ > 3 │ (this.selectorElem satisfies any) = this.multiselectWidget = this.initialValues = undefined;
+ │ ^
+ 4 │ (this.configuration satisfies any) = (this.editor satisfies any) = (this
+ 5 │ .editorBody satisfies any) = undefined;
+
+ i An explicit or implicit semicolon is expected here...
+
+ 1 │ (a satisfies number) = 42;
+ 2 │ ({ a: (b satisfies any) = 2000 } = x);
+ > 3 │ (this.selectorElem satisfies any) = this.multiselectWidget = this.initialValues = undefined;
+ │ ^
+ 4 │ (this.configuration satisfies any) = (this.editor satisfies any) = (this
+ 5 │ .editorBody satisfies any) = undefined;
+
+ i ...Which is required to end this statement
+
+ 1 │ (a satisfies number) = 42;
+ 2 │ ({ a: (b satisfies any) = 2000 } = x);
+ > 3 │ (this.selectorElem satisfies any) = this.multiselectWidget = this.initialValues = undefined;
+ │ ^^^^
+ 4 │ (this.configuration satisfies any) = (this.editor satisfies any) = (this
+ 5 │ .editorBody satisfies any) = undefined;
+
+lhs.ts:4:21 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected `)` but instead found `satisfies`
+
+ 2 │ ({ a: (b satisfies any) = 2000 } = x);
+ 3 │ (this.selectorElem satisfies any) = this.multiselectWidget = this.initialValues = undefined;
+ > 4 │ (this.configuration satisfies any) = (this.editor satisfies any) = (this
+ │ ^^^^^^^^^
+ 5 │ .editorBody satisfies any) = undefined;
+ 6 │
+
+ i Remove satisfies
+
+lhs.ts:4:31 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 2 │ ({ a: (b satisfies any) = 2000 } = x);
+ 3 │ (this.selectorElem satisfies any) = this.multiselectWidget = this.initialValues = undefined;
+ > 4 │ (this.configuration satisfies any) = (this.editor satisfies any) = (this
+ │ ^^^
+ 5 │ .editorBody satisfies any) = undefined;
+ 6 │
+
+ i An explicit or implicit semicolon is expected here...
+
+ 2 │ ({ a: (b satisfies any) = 2000 } = x);
+ 3 │ (this.selectorElem satisfies any) = this.multiselectWidget = this.initialValues = undefined;
+ > 4 │ (this.configuration satisfies any) = (this.editor satisfies any) = (this
+ │ ^^^
+ 5 │ .editorBody satisfies any) = undefined;
+ 6 │
+
+ i ...Which is required to end this statement
+
+ 2 │ ({ a: (b satisfies any) = 2000 } = x);
+ 3 │ (this.selectorElem satisfies any) = this.multiselectWidget = this.initialValues = undefined;
+ > 4 │ (this.configuration satisfies any) = (this.editor satisfies any) = (this
+ │ ^^^^^^^^^^^^^
+ 5 │ .editorBody satisfies any) = undefined;
+ 6 │
+
+lhs.ts:4:34 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 2 │ ({ a: (b satisfies any) = 2000 } = x);
+ 3 │ (this.selectorElem satisfies any) = this.multiselectWidget = this.initialValues = undefined;
+ > 4 │ (this.configuration satisfies any) = (this.editor satisfies any) = (this
+ │ ^
+ 5 │ .editorBody satisfies any) = undefined;
+ 6 │
+
+ i An explicit or implicit semicolon is expected here...
+
+ 2 │ ({ a: (b satisfies any) = 2000 } = x);
+ 3 │ (this.selectorElem satisfies any) = this.multiselectWidget = this.initialValues = undefined;
+ > 4 │ (this.configuration satisfies any) = (this.editor satisfies any) = (this
+ │ ^
+ 5 │ .editorBody satisfies any) = undefined;
+ 6 │
+
+ i ...Which is required to end this statement
+
+ 2 │ ({ a: (b satisfies any) = 2000 } = x);
+ 3 │ (this.selectorElem satisfies any) = this.multiselectWidget = this.initialValues = undefined;
+ > 4 │ (this.configuration satisfies any) = (this.editor satisfies any) = (this
+ │ ^^^^
+ 5 │ .editorBody satisfies any) = undefined;
+ 6 │
+
+
+```
+
+
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/nested-await-and-satisfies.ts b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/nested-await-and-satisfies.ts
new file mode 100644
index 00000000000..d9c2b4a600b
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/nested-await-and-satisfies.ts
@@ -0,0 +1,7 @@
+const getAccountCount = async () =>
+ (await
+ ((await (
+ await focusOnSection(BOOKMARKED_PROJECTS_SECTION_NAME)
+ ).findItem("My bookmarks")) satisfies TreeItem
+ ).getChildren()
+ ).length
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/nested-await-and-satisfies.ts.prettier-snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/nested-await-and-satisfies.ts.prettier-snap
new file mode 100644
index 00000000000..bb76358e68e
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/nested-await-and-satisfies.ts.prettier-snap
@@ -0,0 +1,8 @@
+const getAccountCount = async () =>
+ (
+ await (
+ (await (
+ await focusOnSection(BOOKMARKED_PROJECTS_SECTION_NAME)
+ ).findItem("My bookmarks")) satisfies TreeItem
+ ).getChildren()
+ ).length;
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/nested-await-and-satisfies.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/nested-await-and-satisfies.ts.snap
new file mode 100644
index 00000000000..254488ee31e
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/nested-await-and-satisfies.ts.snap
@@ -0,0 +1,129 @@
+---
+source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/satisfies-operators/nested-await-and-satisfies.ts
+---
+
+# Input
+
+```js
+const getAccountCount = async () =>
+ (await
+ ((await (
+ await focusOnSection(BOOKMARKED_PROJECTS_SECTION_NAME)
+ ).findItem("My bookmarks")) satisfies TreeItem
+ ).getChildren()
+ ).length
+```
+
+
+# Prettier differences
+
+```diff
+--- Prettier
++++ Rome
+@@ -1,8 +1,9 @@
+ const getAccountCount = async () =>
+- (
+- await (
+- (await (
+- await focusOnSection(BOOKMARKED_PROJECTS_SECTION_NAME)
+- ).findItem("My bookmarks")) satisfies TreeItem
+- ).getChildren()
+- ).length;
++ (await
++ ((await (
++ await focusOnSection(BOOKMARKED_PROJECTS_SECTION_NAME)
++ ).findItem("My bookmarks"))
++satisfies;
++TreeItem;
++).getChildren()
++ ).length
+```
+
+# Output
+
+```js
+const getAccountCount = async () =>
+ (await
+ ((await (
+ await focusOnSection(BOOKMARKED_PROJECTS_SECTION_NAME)
+ ).findItem("My bookmarks"))
+satisfies;
+TreeItem;
+).getChildren()
+ ).length
+```
+
+
+# Errors
+```
+nested-await-and-satisfies.ts:5:33 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected `)` but instead found `satisfies`
+
+ 3 │ ((await (
+ 4 │ await focusOnSection(BOOKMARKED_PROJECTS_SECTION_NAME)
+ > 5 │ ).findItem("My bookmarks")) satisfies TreeItem
+ │ ^^^^^^^^^
+ 6 │ ).getChildren()
+ 7 │ ).length
+
+ i Remove satisfies
+
+nested-await-and-satisfies.ts:5:43 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 3 │ ((await (
+ 4 │ await focusOnSection(BOOKMARKED_PROJECTS_SECTION_NAME)
+ > 5 │ ).findItem("My bookmarks")) satisfies TreeItem
+ │ ^^^^^^^^
+ 6 │ ).getChildren()
+ 7 │ ).length
+
+ i An explicit or implicit semicolon is expected here...
+
+ 3 │ ((await (
+ 4 │ await focusOnSection(BOOKMARKED_PROJECTS_SECTION_NAME)
+ > 5 │ ).findItem("My bookmarks")) satisfies TreeItem
+ │ ^^^^^^^^
+ 6 │ ).getChildren()
+ 7 │ ).length
+
+ i ...Which is required to end this statement
+
+ 3 │ ((await (
+ 4 │ await focusOnSection(BOOKMARKED_PROJECTS_SECTION_NAME)
+ > 5 │ ).findItem("My bookmarks")) satisfies TreeItem
+ │ ^^^^^^^^^^^^^^^^^^
+ 6 │ ).getChildren()
+ 7 │ ).length
+
+nested-await-and-satisfies.ts:6:3 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected a statement but instead found ').getChildren()
+ ).length'
+
+ 4 │ await focusOnSection(BOOKMARKED_PROJECTS_SECTION_NAME)
+ 5 │ ).findItem("My bookmarks")) satisfies TreeItem
+ > 6 │ ).getChildren()
+ │ ^^^^^^^^^^^^^^^
+ > 7 │ ).length
+ │ ^^^^^^^^
+ 8 │
+
+ i Expected a statement here
+
+ 4 │ await focusOnSection(BOOKMARKED_PROJECTS_SECTION_NAME)
+ 5 │ ).findItem("My bookmarks")) satisfies TreeItem
+ > 6 │ ).getChildren()
+ │ ^^^^^^^^^^^^^^^
+ > 7 │ ).length
+ │ ^^^^^^^^
+ 8 │
+
+
+```
+
+
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/non-null.ts b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/non-null.ts
new file mode 100644
index 00000000000..9e1e0b3ac0b
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/non-null.ts
@@ -0,0 +1,3 @@
+// the 2nd line needs ASI protection
+const el = ReactDOM.findDOMNode(ref)
+;(el satisfies HTMLElement)!.style.cursor = 'pointer'
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/non-null.ts.prettier-snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/non-null.ts.prettier-snap
new file mode 100644
index 00000000000..407e7d89a99
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/non-null.ts.prettier-snap
@@ -0,0 +1,3 @@
+// the 2nd line needs ASI protection
+const el = ReactDOM.findDOMNode(ref);
+(el satisfies HTMLElement)!.style.cursor = "pointer";
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/non-null.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/non-null.ts.snap
new file mode 100644
index 00000000000..85dad114211
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/non-null.ts.snap
@@ -0,0 +1,112 @@
+---
+source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/satisfies-operators/non-null.ts
+---
+
+# Input
+
+```js
+// the 2nd line needs ASI protection
+const el = ReactDOM.findDOMNode(ref)
+;(el satisfies HTMLElement)!.style.cursor = 'pointer'
+```
+
+
+# Prettier differences
+
+```diff
+--- Prettier
++++ Rome
+@@ -1,3 +1,6 @@
+ // the 2nd line needs ASI protection
+ const el = ReactDOM.findDOMNode(ref);
+-(el satisfies HTMLElement)!.style.cursor = "pointer";
++(el
++satisfies;
++HTMLElement;
++)!.style.cursor = 'pointer'
+```
+
+# Output
+
+```js
+// the 2nd line needs ASI protection
+const el = ReactDOM.findDOMNode(ref);
+(el
+satisfies;
+HTMLElement;
+)!.style.cursor = 'pointer'
+```
+
+
+# Errors
+```
+non-null.ts:3:6 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected `)` but instead found `satisfies`
+
+ 1 │ // the 2nd line needs ASI protection
+ 2 │ const el = ReactDOM.findDOMNode(ref)
+ > 3 │ ;(el satisfies HTMLElement)!.style.cursor = 'pointer'
+ │ ^^^^^^^^^
+ 4 │
+
+ i Remove satisfies
+
+non-null.ts:3:16 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 1 │ // the 2nd line needs ASI protection
+ 2 │ const el = ReactDOM.findDOMNode(ref)
+ > 3 │ ;(el satisfies HTMLElement)!.style.cursor = 'pointer'
+ │ ^^^^^^^^^^^
+ 4 │
+
+ i An explicit or implicit semicolon is expected here...
+
+ 1 │ // the 2nd line needs ASI protection
+ 2 │ const el = ReactDOM.findDOMNode(ref)
+ > 3 │ ;(el satisfies HTMLElement)!.style.cursor = 'pointer'
+ │ ^^^^^^^^^^^
+ 4 │
+
+ i ...Which is required to end this statement
+
+ 1 │ // the 2nd line needs ASI protection
+ 2 │ const el = ReactDOM.findDOMNode(ref)
+ > 3 │ ;(el satisfies HTMLElement)!.style.cursor = 'pointer'
+ │ ^^^^^^^^^^^^^^^^^^^^^
+ 4 │
+
+non-null.ts:3:27 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 1 │ // the 2nd line needs ASI protection
+ 2 │ const el = ReactDOM.findDOMNode(ref)
+ > 3 │ ;(el satisfies HTMLElement)!.style.cursor = 'pointer'
+ │ ^
+ 4 │
+
+ i An explicit or implicit semicolon is expected here...
+
+ 1 │ // the 2nd line needs ASI protection
+ 2 │ const el = ReactDOM.findDOMNode(ref)
+ > 3 │ ;(el satisfies HTMLElement)!.style.cursor = 'pointer'
+ │ ^
+ 4 │
+
+ i ...Which is required to end this statement
+
+ 1 │ // the 2nd line needs ASI protection
+ 2 │ const el = ReactDOM.findDOMNode(ref)
+ > 3 │ ;(el satisfies HTMLElement)!.style.cursor = 'pointer'
+ │ ^^^^^^^^^^^^
+ 4 │
+
+
+```
+
+
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/satisfies.ts b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/satisfies.ts
new file mode 100644
index 00000000000..f9b3f6f2acb
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/satisfies.ts
@@ -0,0 +1,22 @@
+({}) satisfies {};
+({}) satisfies X;
+() => ({}) satisfies X;
+this.isTabActionBar((e.target || e.srcElement) satisfies HTMLElement);
+
+'current' in (props.pagination satisfies Object);
+('current' in props.pagination) satisfies Object;
+start + (yearSelectTotal satisfies number);
+(start + yearSelectTotal) satisfies number;
+scrollTop > (visibilityHeight satisfies number);
+(scrollTop > visibilityHeight) satisfies number;
+(bValue satisfies boolean) ? 0 : -1;
+
+async function g1() {
+ const test = (await 'foo') satisfies number;
+}
+
+var x = (v => v) satisfies (x: number) => string;
+
+foo satisfies unknown satisfies Bar;
+foo satisfies unknown as Bar;
+foo as unknown satisfies Bar;
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/satisfies.ts.prettier-snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/satisfies.ts.prettier-snap
new file mode 100644
index 00000000000..7a3ffd4944f
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/satisfies.ts.prettier-snap
@@ -0,0 +1,22 @@
+({} satisfies {});
+({} satisfies X);
+() => ({} satisfies X);
+this.isTabActionBar((e.target || e.srcElement) satisfies HTMLElement);
+
+"current" in (props.pagination satisfies Object);
+("current" in props.pagination) satisfies Object;
+start + (yearSelectTotal satisfies number);
+(start + yearSelectTotal) satisfies number;
+scrollTop > (visibilityHeight satisfies number);
+(scrollTop > visibilityHeight) satisfies number;
+(bValue satisfies boolean) ? 0 : -1;
+
+async function g1() {
+ const test = (await "foo") satisfies number;
+}
+
+var x = ((v) => v) satisfies (x: number) => string;
+
+foo satisfies unknown satisfies Bar;
+foo satisfies unknown as Bar;
+foo as unknown satisfies Bar;
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/satisfies.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/satisfies.ts.snap
new file mode 100644
index 00000000000..f253e9c85c1
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/satisfies.ts.snap
@@ -0,0 +1,1164 @@
+---
+source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/satisfies-operators/satisfies.ts
+---
+
+# Input
+
+```js
+({}) satisfies {};
+({}) satisfies X;
+() => ({}) satisfies X;
+this.isTabActionBar((e.target || e.srcElement) satisfies HTMLElement);
+
+'current' in (props.pagination satisfies Object);
+('current' in props.pagination) satisfies Object;
+start + (yearSelectTotal satisfies number);
+(start + yearSelectTotal) satisfies number;
+scrollTop > (visibilityHeight satisfies number);
+(scrollTop > visibilityHeight) satisfies number;
+(bValue satisfies boolean) ? 0 : -1;
+
+async function g1() {
+ const test = (await 'foo') satisfies number;
+}
+
+var x = (v => v) satisfies (x: number) => string;
+
+foo satisfies unknown satisfies Bar;
+foo satisfies unknown as Bar;
+foo as unknown satisfies Bar;
+```
+
+
+# Prettier differences
+
+```diff
+--- Prettier
++++ Rome
+@@ -1,22 +1,59 @@
+-({} satisfies {});
+-({} satisfies X);
+-() => ({} satisfies X);
++({});
++satisfies;
++{
++}
++({});
++satisfies;
++X;
++() => ({});
++satisfies;
++X;
+ this.isTabActionBar((e.target || e.srcElement) satisfies HTMLElement);
+
+-"current" in (props.pagination satisfies Object);
+-("current" in props.pagination) satisfies Object;
+-start + (yearSelectTotal satisfies number);
+-(start + yearSelectTotal) satisfies number;
+-scrollTop > (visibilityHeight satisfies number);
+-(scrollTop > visibilityHeight) satisfies number;
+-(bValue satisfies boolean) ? 0 : -1;
++'current' in (props.pagination
++satisfies;
++Object;
++)
++"current" in props.pagination;
++satisfies;
++Object;
++start + (yearSelectTotal
++satisfies;
++number;
++)
++start + yearSelectTotal;
++satisfies;
++number;
++scrollTop > (visibilityHeight
++satisfies;
++number;
++)
++scrollTop > visibilityHeight;
++satisfies;
++number;
++(bValue
++satisfies;
++boolean;
++) ? 0 : -1
+
+ async function g1() {
+- const test = (await "foo") satisfies number;
++ const test = await "foo";
++ satisfies;
++ number;
+ }
+
+-var x = ((v) => v) satisfies (x: number) => string;
++var x = (v) => v;
++satisfies (x: number)
++=> string
+
+-foo satisfies unknown satisfies Bar;
+-foo satisfies unknown as Bar;
+-foo as unknown satisfies Bar;
++foo;
++satisfies;
++unknown;
++satisfies;
++Bar;
++foo;
++satisfies;
++unknown as Bar;
++foo as unknown;
++satisfies;
++Bar;
+```
+
+# Output
+
+```js
+({});
+satisfies;
+{
+}
+({});
+satisfies;
+X;
+() => ({});
+satisfies;
+X;
+this.isTabActionBar((e.target || e.srcElement) satisfies HTMLElement);
+
+'current' in (props.pagination
+satisfies;
+Object;
+)
+"current" in props.pagination;
+satisfies;
+Object;
+start + (yearSelectTotal
+satisfies;
+number;
+)
+start + yearSelectTotal;
+satisfies;
+number;
+scrollTop > (visibilityHeight
+satisfies;
+number;
+)
+scrollTop > visibilityHeight;
+satisfies;
+number;
+(bValue
+satisfies;
+boolean;
+) ? 0 : -1
+
+async function g1() {
+ const test = await "foo";
+ satisfies;
+ number;
+}
+
+var x = (v) => v;
+satisfies (x: number)
+=> string
+
+foo;
+satisfies;
+unknown;
+satisfies;
+Bar;
+foo;
+satisfies;
+unknown as Bar;
+foo as unknown;
+satisfies;
+Bar;
+```
+
+
+# Errors
+```
+satisfies.ts:1:6 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ > 1 │ ({}) satisfies {};
+ │ ^^^^^^^^^
+ 2 │ ({}) satisfies X;
+ 3 │ () => ({}) satisfies X;
+
+ i An explicit or implicit semicolon is expected here...
+
+ > 1 │ ({}) satisfies {};
+ │ ^^^^^^^^^
+ 2 │ ({}) satisfies X;
+ 3 │ () => ({}) satisfies X;
+
+ i ...Which is required to end this statement
+
+ > 1 │ ({}) satisfies {};
+ │ ^^^^^^^^^^^^^^
+ 2 │ ({}) satisfies X;
+ 3 │ () => ({}) satisfies X;
+
+satisfies.ts:1:16 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ > 1 │ ({}) satisfies {};
+ │ ^
+ 2 │ ({}) satisfies X;
+ 3 │ () => ({}) satisfies X;
+
+ i An explicit or implicit semicolon is expected here...
+
+ > 1 │ ({}) satisfies {};
+ │ ^
+ 2 │ ({}) satisfies X;
+ 3 │ () => ({}) satisfies X;
+
+ i ...Which is required to end this statement
+
+ > 1 │ ({}) satisfies {};
+ │ ^^^^^^^^^^^
+ 2 │ ({}) satisfies X;
+ 3 │ () => ({}) satisfies X;
+
+satisfies.ts:2:6 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 1 │ ({}) satisfies {};
+ > 2 │ ({}) satisfies X;
+ │ ^^^^^^^^^
+ 3 │ () => ({}) satisfies X;
+ 4 │ this.isTabActionBar((e.target || e.srcElement) satisfies HTMLElement);
+
+ i An explicit or implicit semicolon is expected here...
+
+ 1 │ ({}) satisfies {};
+ > 2 │ ({}) satisfies X;
+ │ ^^^^^^^^^
+ 3 │ () => ({}) satisfies X;
+ 4 │ this.isTabActionBar((e.target || e.srcElement) satisfies HTMLElement);
+
+ i ...Which is required to end this statement
+
+ 1 │ ({}) satisfies {};
+ > 2 │ ({}) satisfies X;
+ │ ^^^^^^^^^^^^^^
+ 3 │ () => ({}) satisfies X;
+ 4 │ this.isTabActionBar((e.target || e.srcElement) satisfies HTMLElement);
+
+satisfies.ts:2:16 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 1 │ ({}) satisfies {};
+ > 2 │ ({}) satisfies X;
+ │ ^
+ 3 │ () => ({}) satisfies X;
+ 4 │ this.isTabActionBar((e.target || e.srcElement) satisfies HTMLElement);
+
+ i An explicit or implicit semicolon is expected here...
+
+ 1 │ ({}) satisfies {};
+ > 2 │ ({}) satisfies X;
+ │ ^
+ 3 │ () => ({}) satisfies X;
+ 4 │ this.isTabActionBar((e.target || e.srcElement) satisfies HTMLElement);
+
+ i ...Which is required to end this statement
+
+ 1 │ ({}) satisfies {};
+ > 2 │ ({}) satisfies X;
+ │ ^^^^^^^^^^^
+ 3 │ () => ({}) satisfies X;
+ 4 │ this.isTabActionBar((e.target || e.srcElement) satisfies HTMLElement);
+
+satisfies.ts:3:12 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 1 │ ({}) satisfies {};
+ 2 │ ({}) satisfies X;
+ > 3 │ () => ({}) satisfies X;
+ │ ^^^^^^^^^
+ 4 │ this.isTabActionBar((e.target || e.srcElement) satisfies HTMLElement);
+ 5 │
+
+ i An explicit or implicit semicolon is expected here...
+
+ 1 │ ({}) satisfies {};
+ 2 │ ({}) satisfies X;
+ > 3 │ () => ({}) satisfies X;
+ │ ^^^^^^^^^
+ 4 │ this.isTabActionBar((e.target || e.srcElement) satisfies HTMLElement);
+ 5 │
+
+ i ...Which is required to end this statement
+
+ 1 │ ({}) satisfies {};
+ 2 │ ({}) satisfies X;
+ > 3 │ () => ({}) satisfies X;
+ │ ^^^^^^^^^^^^^^^^^^^^
+ 4 │ this.isTabActionBar((e.target || e.srcElement) satisfies HTMLElement);
+ 5 │
+
+satisfies.ts:3:22 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 1 │ ({}) satisfies {};
+ 2 │ ({}) satisfies X;
+ > 3 │ () => ({}) satisfies X;
+ │ ^
+ 4 │ this.isTabActionBar((e.target || e.srcElement) satisfies HTMLElement);
+ 5 │
+
+ i An explicit or implicit semicolon is expected here...
+
+ 1 │ ({}) satisfies {};
+ 2 │ ({}) satisfies X;
+ > 3 │ () => ({}) satisfies X;
+ │ ^
+ 4 │ this.isTabActionBar((e.target || e.srcElement) satisfies HTMLElement);
+ 5 │
+
+ i ...Which is required to end this statement
+
+ 1 │ ({}) satisfies {};
+ 2 │ ({}) satisfies X;
+ > 3 │ () => ({}) satisfies X;
+ │ ^^^^^^^^^^^
+ 4 │ this.isTabActionBar((e.target || e.srcElement) satisfies HTMLElement);
+ 5 │
+
+satisfies.ts:4:48 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected `,` but instead found `satisfies`
+
+ 2 │ ({}) satisfies X;
+ 3 │ () => ({}) satisfies X;
+ > 4 │ this.isTabActionBar((e.target || e.srcElement) satisfies HTMLElement);
+ │ ^^^^^^^^^
+ 5 │
+ 6 │ 'current' in (props.pagination satisfies Object);
+
+ i Remove satisfies
+
+satisfies.ts:4:58 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected `,` but instead found `HTMLElement`
+
+ 2 │ ({}) satisfies X;
+ 3 │ () => ({}) satisfies X;
+ > 4 │ this.isTabActionBar((e.target || e.srcElement) satisfies HTMLElement);
+ │ ^^^^^^^^^^^
+ 5 │
+ 6 │ 'current' in (props.pagination satisfies Object);
+
+ i Remove HTMLElement
+
+satisfies.ts:6:32 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected `)` but instead found `satisfies`
+
+ 4 │ this.isTabActionBar((e.target || e.srcElement) satisfies HTMLElement);
+ 5 │
+ > 6 │ 'current' in (props.pagination satisfies Object);
+ │ ^^^^^^^^^
+ 7 │ ('current' in props.pagination) satisfies Object;
+ 8 │ start + (yearSelectTotal satisfies number);
+
+ i Remove satisfies
+
+satisfies.ts:6:42 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 4 │ this.isTabActionBar((e.target || e.srcElement) satisfies HTMLElement);
+ 5 │
+ > 6 │ 'current' in (props.pagination satisfies Object);
+ │ ^^^^^^
+ 7 │ ('current' in props.pagination) satisfies Object;
+ 8 │ start + (yearSelectTotal satisfies number);
+
+ i An explicit or implicit semicolon is expected here...
+
+ 4 │ this.isTabActionBar((e.target || e.srcElement) satisfies HTMLElement);
+ 5 │
+ > 6 │ 'current' in (props.pagination satisfies Object);
+ │ ^^^^^^
+ 7 │ ('current' in props.pagination) satisfies Object;
+ 8 │ start + (yearSelectTotal satisfies number);
+
+ i ...Which is required to end this statement
+
+ 4 │ this.isTabActionBar((e.target || e.srcElement) satisfies HTMLElement);
+ 5 │
+ > 6 │ 'current' in (props.pagination satisfies Object);
+ │ ^^^^^^^^^^^^^^^^
+ 7 │ ('current' in props.pagination) satisfies Object;
+ 8 │ start + (yearSelectTotal satisfies number);
+
+satisfies.ts:6:48 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 4 │ this.isTabActionBar((e.target || e.srcElement) satisfies HTMLElement);
+ 5 │
+ > 6 │ 'current' in (props.pagination satisfies Object);
+ │ ^
+ 7 │ ('current' in props.pagination) satisfies Object;
+ 8 │ start + (yearSelectTotal satisfies number);
+
+ i An explicit or implicit semicolon is expected here...
+
+ 4 │ this.isTabActionBar((e.target || e.srcElement) satisfies HTMLElement);
+ 5 │
+ > 6 │ 'current' in (props.pagination satisfies Object);
+ │ ^
+ 7 │ ('current' in props.pagination) satisfies Object;
+ 8 │ start + (yearSelectTotal satisfies number);
+
+ i ...Which is required to end this statement
+
+ 4 │ this.isTabActionBar((e.target || e.srcElement) satisfies HTMLElement);
+ 5 │
+ > 6 │ 'current' in (props.pagination satisfies Object);
+ │ ^^^^^^^
+ 7 │ ('current' in props.pagination) satisfies Object;
+ 8 │ start + (yearSelectTotal satisfies number);
+
+satisfies.ts:7:33 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 6 │ 'current' in (props.pagination satisfies Object);
+ > 7 │ ('current' in props.pagination) satisfies Object;
+ │ ^^^^^^^^^
+ 8 │ start + (yearSelectTotal satisfies number);
+ 9 │ (start + yearSelectTotal) satisfies number;
+
+ i An explicit or implicit semicolon is expected here...
+
+ 6 │ 'current' in (props.pagination satisfies Object);
+ > 7 │ ('current' in props.pagination) satisfies Object;
+ │ ^^^^^^^^^
+ 8 │ start + (yearSelectTotal satisfies number);
+ 9 │ (start + yearSelectTotal) satisfies number;
+
+ i ...Which is required to end this statement
+
+ 6 │ 'current' in (props.pagination satisfies Object);
+ > 7 │ ('current' in props.pagination) satisfies Object;
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ 8 │ start + (yearSelectTotal satisfies number);
+ 9 │ (start + yearSelectTotal) satisfies number;
+
+satisfies.ts:7:43 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 6 │ 'current' in (props.pagination satisfies Object);
+ > 7 │ ('current' in props.pagination) satisfies Object;
+ │ ^^^^^^
+ 8 │ start + (yearSelectTotal satisfies number);
+ 9 │ (start + yearSelectTotal) satisfies number;
+
+ i An explicit or implicit semicolon is expected here...
+
+ 6 │ 'current' in (props.pagination satisfies Object);
+ > 7 │ ('current' in props.pagination) satisfies Object;
+ │ ^^^^^^
+ 8 │ start + (yearSelectTotal satisfies number);
+ 9 │ (start + yearSelectTotal) satisfies number;
+
+ i ...Which is required to end this statement
+
+ 6 │ 'current' in (props.pagination satisfies Object);
+ > 7 │ ('current' in props.pagination) satisfies Object;
+ │ ^^^^^^^^^^^^^^^^
+ 8 │ start + (yearSelectTotal satisfies number);
+ 9 │ (start + yearSelectTotal) satisfies number;
+
+satisfies.ts:8:26 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected `)` but instead found `satisfies`
+
+ 6 │ 'current' in (props.pagination satisfies Object);
+ 7 │ ('current' in props.pagination) satisfies Object;
+ > 8 │ start + (yearSelectTotal satisfies number);
+ │ ^^^^^^^^^
+ 9 │ (start + yearSelectTotal) satisfies number;
+ 10 │ scrollTop > (visibilityHeight satisfies number);
+
+ i Remove satisfies
+
+satisfies.ts:8:36 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 6 │ 'current' in (props.pagination satisfies Object);
+ 7 │ ('current' in props.pagination) satisfies Object;
+ > 8 │ start + (yearSelectTotal satisfies number);
+ │ ^^^^^^
+ 9 │ (start + yearSelectTotal) satisfies number;
+ 10 │ scrollTop > (visibilityHeight satisfies number);
+
+ i An explicit or implicit semicolon is expected here...
+
+ 6 │ 'current' in (props.pagination satisfies Object);
+ 7 │ ('current' in props.pagination) satisfies Object;
+ > 8 │ start + (yearSelectTotal satisfies number);
+ │ ^^^^^^
+ 9 │ (start + yearSelectTotal) satisfies number;
+ 10 │ scrollTop > (visibilityHeight satisfies number);
+
+ i ...Which is required to end this statement
+
+ 6 │ 'current' in (props.pagination satisfies Object);
+ 7 │ ('current' in props.pagination) satisfies Object;
+ > 8 │ start + (yearSelectTotal satisfies number);
+ │ ^^^^^^^^^^^^^^^^
+ 9 │ (start + yearSelectTotal) satisfies number;
+ 10 │ scrollTop > (visibilityHeight satisfies number);
+
+satisfies.ts:8:42 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 6 │ 'current' in (props.pagination satisfies Object);
+ 7 │ ('current' in props.pagination) satisfies Object;
+ > 8 │ start + (yearSelectTotal satisfies number);
+ │ ^
+ 9 │ (start + yearSelectTotal) satisfies number;
+ 10 │ scrollTop > (visibilityHeight satisfies number);
+
+ i An explicit or implicit semicolon is expected here...
+
+ 6 │ 'current' in (props.pagination satisfies Object);
+ 7 │ ('current' in props.pagination) satisfies Object;
+ > 8 │ start + (yearSelectTotal satisfies number);
+ │ ^
+ 9 │ (start + yearSelectTotal) satisfies number;
+ 10 │ scrollTop > (visibilityHeight satisfies number);
+
+ i ...Which is required to end this statement
+
+ 6 │ 'current' in (props.pagination satisfies Object);
+ 7 │ ('current' in props.pagination) satisfies Object;
+ > 8 │ start + (yearSelectTotal satisfies number);
+ │ ^^^^^^^
+ 9 │ (start + yearSelectTotal) satisfies number;
+ 10 │ scrollTop > (visibilityHeight satisfies number);
+
+satisfies.ts:9:27 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 7 │ ('current' in props.pagination) satisfies Object;
+ 8 │ start + (yearSelectTotal satisfies number);
+ > 9 │ (start + yearSelectTotal) satisfies number;
+ │ ^^^^^^^^^
+ 10 │ scrollTop > (visibilityHeight satisfies number);
+ 11 │ (scrollTop > visibilityHeight) satisfies number;
+
+ i An explicit or implicit semicolon is expected here...
+
+ 7 │ ('current' in props.pagination) satisfies Object;
+ 8 │ start + (yearSelectTotal satisfies number);
+ > 9 │ (start + yearSelectTotal) satisfies number;
+ │ ^^^^^^^^^
+ 10 │ scrollTop > (visibilityHeight satisfies number);
+ 11 │ (scrollTop > visibilityHeight) satisfies number;
+
+ i ...Which is required to end this statement
+
+ 7 │ ('current' in props.pagination) satisfies Object;
+ 8 │ start + (yearSelectTotal satisfies number);
+ > 9 │ (start + yearSelectTotal) satisfies number;
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ 10 │ scrollTop > (visibilityHeight satisfies number);
+ 11 │ (scrollTop > visibilityHeight) satisfies number;
+
+satisfies.ts:9:37 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 7 │ ('current' in props.pagination) satisfies Object;
+ 8 │ start + (yearSelectTotal satisfies number);
+ > 9 │ (start + yearSelectTotal) satisfies number;
+ │ ^^^^^^
+ 10 │ scrollTop > (visibilityHeight satisfies number);
+ 11 │ (scrollTop > visibilityHeight) satisfies number;
+
+ i An explicit or implicit semicolon is expected here...
+
+ 7 │ ('current' in props.pagination) satisfies Object;
+ 8 │ start + (yearSelectTotal satisfies number);
+ > 9 │ (start + yearSelectTotal) satisfies number;
+ │ ^^^^^^
+ 10 │ scrollTop > (visibilityHeight satisfies number);
+ 11 │ (scrollTop > visibilityHeight) satisfies number;
+
+ i ...Which is required to end this statement
+
+ 7 │ ('current' in props.pagination) satisfies Object;
+ 8 │ start + (yearSelectTotal satisfies number);
+ > 9 │ (start + yearSelectTotal) satisfies number;
+ │ ^^^^^^^^^^^^^^^^
+ 10 │ scrollTop > (visibilityHeight satisfies number);
+ 11 │ (scrollTop > visibilityHeight) satisfies number;
+
+satisfies.ts:10:31 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected `)` but instead found `satisfies`
+
+ 8 │ start + (yearSelectTotal satisfies number);
+ 9 │ (start + yearSelectTotal) satisfies number;
+ > 10 │ scrollTop > (visibilityHeight satisfies number);
+ │ ^^^^^^^^^
+ 11 │ (scrollTop > visibilityHeight) satisfies number;
+ 12 │ (bValue satisfies boolean) ? 0 : -1;
+
+ i Remove satisfies
+
+satisfies.ts:10:41 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 8 │ start + (yearSelectTotal satisfies number);
+ 9 │ (start + yearSelectTotal) satisfies number;
+ > 10 │ scrollTop > (visibilityHeight satisfies number);
+ │ ^^^^^^
+ 11 │ (scrollTop > visibilityHeight) satisfies number;
+ 12 │ (bValue satisfies boolean) ? 0 : -1;
+
+ i An explicit or implicit semicolon is expected here...
+
+ 8 │ start + (yearSelectTotal satisfies number);
+ 9 │ (start + yearSelectTotal) satisfies number;
+ > 10 │ scrollTop > (visibilityHeight satisfies number);
+ │ ^^^^^^
+ 11 │ (scrollTop > visibilityHeight) satisfies number;
+ 12 │ (bValue satisfies boolean) ? 0 : -1;
+
+ i ...Which is required to end this statement
+
+ 8 │ start + (yearSelectTotal satisfies number);
+ 9 │ (start + yearSelectTotal) satisfies number;
+ > 10 │ scrollTop > (visibilityHeight satisfies number);
+ │ ^^^^^^^^^^^^^^^^
+ 11 │ (scrollTop > visibilityHeight) satisfies number;
+ 12 │ (bValue satisfies boolean) ? 0 : -1;
+
+satisfies.ts:10:47 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 8 │ start + (yearSelectTotal satisfies number);
+ 9 │ (start + yearSelectTotal) satisfies number;
+ > 10 │ scrollTop > (visibilityHeight satisfies number);
+ │ ^
+ 11 │ (scrollTop > visibilityHeight) satisfies number;
+ 12 │ (bValue satisfies boolean) ? 0 : -1;
+
+ i An explicit or implicit semicolon is expected here...
+
+ 8 │ start + (yearSelectTotal satisfies number);
+ 9 │ (start + yearSelectTotal) satisfies number;
+ > 10 │ scrollTop > (visibilityHeight satisfies number);
+ │ ^
+ 11 │ (scrollTop > visibilityHeight) satisfies number;
+ 12 │ (bValue satisfies boolean) ? 0 : -1;
+
+ i ...Which is required to end this statement
+
+ 8 │ start + (yearSelectTotal satisfies number);
+ 9 │ (start + yearSelectTotal) satisfies number;
+ > 10 │ scrollTop > (visibilityHeight satisfies number);
+ │ ^^^^^^^
+ 11 │ (scrollTop > visibilityHeight) satisfies number;
+ 12 │ (bValue satisfies boolean) ? 0 : -1;
+
+satisfies.ts:11:32 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 9 │ (start + yearSelectTotal) satisfies number;
+ 10 │ scrollTop > (visibilityHeight satisfies number);
+ > 11 │ (scrollTop > visibilityHeight) satisfies number;
+ │ ^^^^^^^^^
+ 12 │ (bValue satisfies boolean) ? 0 : -1;
+ 13 │
+
+ i An explicit or implicit semicolon is expected here...
+
+ 9 │ (start + yearSelectTotal) satisfies number;
+ 10 │ scrollTop > (visibilityHeight satisfies number);
+ > 11 │ (scrollTop > visibilityHeight) satisfies number;
+ │ ^^^^^^^^^
+ 12 │ (bValue satisfies boolean) ? 0 : -1;
+ 13 │
+
+ i ...Which is required to end this statement
+
+ 9 │ (start + yearSelectTotal) satisfies number;
+ 10 │ scrollTop > (visibilityHeight satisfies number);
+ > 11 │ (scrollTop > visibilityHeight) satisfies number;
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ 12 │ (bValue satisfies boolean) ? 0 : -1;
+ 13 │
+
+satisfies.ts:11:42 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 9 │ (start + yearSelectTotal) satisfies number;
+ 10 │ scrollTop > (visibilityHeight satisfies number);
+ > 11 │ (scrollTop > visibilityHeight) satisfies number;
+ │ ^^^^^^
+ 12 │ (bValue satisfies boolean) ? 0 : -1;
+ 13 │
+
+ i An explicit or implicit semicolon is expected here...
+
+ 9 │ (start + yearSelectTotal) satisfies number;
+ 10 │ scrollTop > (visibilityHeight satisfies number);
+ > 11 │ (scrollTop > visibilityHeight) satisfies number;
+ │ ^^^^^^
+ 12 │ (bValue satisfies boolean) ? 0 : -1;
+ 13 │
+
+ i ...Which is required to end this statement
+
+ 9 │ (start + yearSelectTotal) satisfies number;
+ 10 │ scrollTop > (visibilityHeight satisfies number);
+ > 11 │ (scrollTop > visibilityHeight) satisfies number;
+ │ ^^^^^^^^^^^^^^^^
+ 12 │ (bValue satisfies boolean) ? 0 : -1;
+ 13 │
+
+satisfies.ts:12:9 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected `)` but instead found `satisfies`
+
+ 10 │ scrollTop > (visibilityHeight satisfies number);
+ 11 │ (scrollTop > visibilityHeight) satisfies number;
+ > 12 │ (bValue satisfies boolean) ? 0 : -1;
+ │ ^^^^^^^^^
+ 13 │
+ 14 │ async function g1() {
+
+ i Remove satisfies
+
+satisfies.ts:12:19 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 10 │ scrollTop > (visibilityHeight satisfies number);
+ 11 │ (scrollTop > visibilityHeight) satisfies number;
+ > 12 │ (bValue satisfies boolean) ? 0 : -1;
+ │ ^^^^^^^
+ 13 │
+ 14 │ async function g1() {
+
+ i An explicit or implicit semicolon is expected here...
+
+ 10 │ scrollTop > (visibilityHeight satisfies number);
+ 11 │ (scrollTop > visibilityHeight) satisfies number;
+ > 12 │ (bValue satisfies boolean) ? 0 : -1;
+ │ ^^^^^^^
+ 13 │
+ 14 │ async function g1() {
+
+ i ...Which is required to end this statement
+
+ 10 │ scrollTop > (visibilityHeight satisfies number);
+ 11 │ (scrollTop > visibilityHeight) satisfies number;
+ > 12 │ (bValue satisfies boolean) ? 0 : -1;
+ │ ^^^^^^^^^^^^^^^^^
+ 13 │
+ 14 │ async function g1() {
+
+satisfies.ts:12:26 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 10 │ scrollTop > (visibilityHeight satisfies number);
+ 11 │ (scrollTop > visibilityHeight) satisfies number;
+ > 12 │ (bValue satisfies boolean) ? 0 : -1;
+ │ ^
+ 13 │
+ 14 │ async function g1() {
+
+ i An explicit or implicit semicolon is expected here...
+
+ 10 │ scrollTop > (visibilityHeight satisfies number);
+ 11 │ (scrollTop > visibilityHeight) satisfies number;
+ > 12 │ (bValue satisfies boolean) ? 0 : -1;
+ │ ^
+ 13 │
+ 14 │ async function g1() {
+
+ i ...Which is required to end this statement
+
+ 10 │ scrollTop > (visibilityHeight satisfies number);
+ 11 │ (scrollTop > visibilityHeight) satisfies number;
+ > 12 │ (bValue satisfies boolean) ? 0 : -1;
+ │ ^^^^^^^^
+ 13 │
+ 14 │ async function g1() {
+
+satisfies.ts:15:30 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 14 │ async function g1() {
+ > 15 │ const test = (await 'foo') satisfies number;
+ │ ^^^^^^^^^
+ 16 │ }
+ 17 │
+
+ i An explicit or implicit semicolon is expected here...
+
+ 14 │ async function g1() {
+ > 15 │ const test = (await 'foo') satisfies number;
+ │ ^^^^^^^^^
+ 16 │ }
+ 17 │
+
+ i ...Which is required to end this statement
+
+ 14 │ async function g1() {
+ > 15 │ const test = (await 'foo') satisfies number;
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ 16 │ }
+ 17 │
+
+satisfies.ts:15:40 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 14 │ async function g1() {
+ > 15 │ const test = (await 'foo') satisfies number;
+ │ ^^^^^^
+ 16 │ }
+ 17 │
+
+ i An explicit or implicit semicolon is expected here...
+
+ 14 │ async function g1() {
+ > 15 │ const test = (await 'foo') satisfies number;
+ │ ^^^^^^
+ 16 │ }
+ 17 │
+
+ i ...Which is required to end this statement
+
+ 14 │ async function g1() {
+ > 15 │ const test = (await 'foo') satisfies number;
+ │ ^^^^^^^^^^^^^^^^
+ 16 │ }
+ 17 │
+
+satisfies.ts:18:18 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 16 │ }
+ 17 │
+ > 18 │ var x = (v => v) satisfies (x: number) => string;
+ │ ^^^^^^^^^
+ 19 │
+ 20 │ foo satisfies unknown satisfies Bar;
+
+ i An explicit or implicit semicolon is expected here...
+
+ 16 │ }
+ 17 │
+ > 18 │ var x = (v => v) satisfies (x: number) => string;
+ │ ^^^^^^^^^
+ 19 │
+ 20 │ foo satisfies unknown satisfies Bar;
+
+ i ...Which is required to end this statement
+
+ 16 │ }
+ 17 │
+ > 18 │ var x = (v => v) satisfies (x: number) => string;
+ │ ^^^^^^^^^^^^^^^^^
+ 19 │
+ 20 │ foo satisfies unknown satisfies Bar;
+
+satisfies.ts:18:30 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected `,` but instead found `:`
+
+ 16 │ }
+ 17 │
+ > 18 │ var x = (v => v) satisfies (x: number) => string;
+ │ ^
+ 19 │
+ 20 │ foo satisfies unknown satisfies Bar;
+
+ i Remove :
+
+satisfies.ts:18:40 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 16 │ }
+ 17 │
+ > 18 │ var x = (v => v) satisfies (x: number) => string;
+ │ ^^
+ 19 │
+ 20 │ foo satisfies unknown satisfies Bar;
+
+ i An explicit or implicit semicolon is expected here...
+
+ 16 │ }
+ 17 │
+ > 18 │ var x = (v => v) satisfies (x: number) => string;
+ │ ^^
+ 19 │
+ 20 │ foo satisfies unknown satisfies Bar;
+
+ i ...Which is required to end this statement
+
+ 16 │ }
+ 17 │
+ > 18 │ var x = (v => v) satisfies (x: number) => string;
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^
+ 19 │
+ 20 │ foo satisfies unknown satisfies Bar;
+
+satisfies.ts:20:5 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 18 │ var x = (v => v) satisfies (x: number) => string;
+ 19 │
+ > 20 │ foo satisfies unknown satisfies Bar;
+ │ ^^^^^^^^^
+ 21 │ foo satisfies unknown as Bar;
+ 22 │ foo as unknown satisfies Bar;
+
+ i An explicit or implicit semicolon is expected here...
+
+ 18 │ var x = (v => v) satisfies (x: number) => string;
+ 19 │
+ > 20 │ foo satisfies unknown satisfies Bar;
+ │ ^^^^^^^^^
+ 21 │ foo satisfies unknown as Bar;
+ 22 │ foo as unknown satisfies Bar;
+
+ i ...Which is required to end this statement
+
+ 18 │ var x = (v => v) satisfies (x: number) => string;
+ 19 │
+ > 20 │ foo satisfies unknown satisfies Bar;
+ │ ^^^^^^^^^^^^^
+ 21 │ foo satisfies unknown as Bar;
+ 22 │ foo as unknown satisfies Bar;
+
+satisfies.ts:20:15 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 18 │ var x = (v => v) satisfies (x: number) => string;
+ 19 │
+ > 20 │ foo satisfies unknown satisfies Bar;
+ │ ^^^^^^^
+ 21 │ foo satisfies unknown as Bar;
+ 22 │ foo as unknown satisfies Bar;
+
+ i An explicit or implicit semicolon is expected here...
+
+ 18 │ var x = (v => v) satisfies (x: number) => string;
+ 19 │
+ > 20 │ foo satisfies unknown satisfies Bar;
+ │ ^^^^^^^
+ 21 │ foo satisfies unknown as Bar;
+ 22 │ foo as unknown satisfies Bar;
+
+ i ...Which is required to end this statement
+
+ 18 │ var x = (v => v) satisfies (x: number) => string;
+ 19 │
+ > 20 │ foo satisfies unknown satisfies Bar;
+ │ ^^^^^^^^^^^^^^^^^
+ 21 │ foo satisfies unknown as Bar;
+ 22 │ foo as unknown satisfies Bar;
+
+satisfies.ts:20:23 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 18 │ var x = (v => v) satisfies (x: number) => string;
+ 19 │
+ > 20 │ foo satisfies unknown satisfies Bar;
+ │ ^^^^^^^^^
+ 21 │ foo satisfies unknown as Bar;
+ 22 │ foo as unknown satisfies Bar;
+
+ i An explicit or implicit semicolon is expected here...
+
+ 18 │ var x = (v => v) satisfies (x: number) => string;
+ 19 │
+ > 20 │ foo satisfies unknown satisfies Bar;
+ │ ^^^^^^^^^
+ 21 │ foo satisfies unknown as Bar;
+ 22 │ foo as unknown satisfies Bar;
+
+ i ...Which is required to end this statement
+
+ 18 │ var x = (v => v) satisfies (x: number) => string;
+ 19 │
+ > 20 │ foo satisfies unknown satisfies Bar;
+ │ ^^^^^^^^^^^^^^^^^
+ 21 │ foo satisfies unknown as Bar;
+ 22 │ foo as unknown satisfies Bar;
+
+satisfies.ts:20:33 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 18 │ var x = (v => v) satisfies (x: number) => string;
+ 19 │
+ > 20 │ foo satisfies unknown satisfies Bar;
+ │ ^^^
+ 21 │ foo satisfies unknown as Bar;
+ 22 │ foo as unknown satisfies Bar;
+
+ i An explicit or implicit semicolon is expected here...
+
+ 18 │ var x = (v => v) satisfies (x: number) => string;
+ 19 │
+ > 20 │ foo satisfies unknown satisfies Bar;
+ │ ^^^
+ 21 │ foo satisfies unknown as Bar;
+ 22 │ foo as unknown satisfies Bar;
+
+ i ...Which is required to end this statement
+
+ 18 │ var x = (v => v) satisfies (x: number) => string;
+ 19 │
+ > 20 │ foo satisfies unknown satisfies Bar;
+ │ ^^^^^^^^^^^^^
+ 21 │ foo satisfies unknown as Bar;
+ 22 │ foo as unknown satisfies Bar;
+
+satisfies.ts:21:5 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 20 │ foo satisfies unknown satisfies Bar;
+ > 21 │ foo satisfies unknown as Bar;
+ │ ^^^^^^^^^
+ 22 │ foo as unknown satisfies Bar;
+ 23 │
+
+ i An explicit or implicit semicolon is expected here...
+
+ 20 │ foo satisfies unknown satisfies Bar;
+ > 21 │ foo satisfies unknown as Bar;
+ │ ^^^^^^^^^
+ 22 │ foo as unknown satisfies Bar;
+ 23 │
+
+ i ...Which is required to end this statement
+
+ 20 │ foo satisfies unknown satisfies Bar;
+ > 21 │ foo satisfies unknown as Bar;
+ │ ^^^^^^^^^^^^^
+ 22 │ foo as unknown satisfies Bar;
+ 23 │
+
+satisfies.ts:21:15 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 20 │ foo satisfies unknown satisfies Bar;
+ > 21 │ foo satisfies unknown as Bar;
+ │ ^^^^^^^
+ 22 │ foo as unknown satisfies Bar;
+ 23 │
+
+ i An explicit or implicit semicolon is expected here...
+
+ 20 │ foo satisfies unknown satisfies Bar;
+ > 21 │ foo satisfies unknown as Bar;
+ │ ^^^^^^^
+ 22 │ foo as unknown satisfies Bar;
+ 23 │
+
+ i ...Which is required to end this statement
+
+ 20 │ foo satisfies unknown satisfies Bar;
+ > 21 │ foo satisfies unknown as Bar;
+ │ ^^^^^^^^^^^^^^^^^
+ 22 │ foo as unknown satisfies Bar;
+ 23 │
+
+satisfies.ts:22:16 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 20 │ foo satisfies unknown satisfies Bar;
+ 21 │ foo satisfies unknown as Bar;
+ > 22 │ foo as unknown satisfies Bar;
+ │ ^^^^^^^^^
+ 23 │
+
+ i An explicit or implicit semicolon is expected here...
+
+ 20 │ foo satisfies unknown satisfies Bar;
+ 21 │ foo satisfies unknown as Bar;
+ > 22 │ foo as unknown satisfies Bar;
+ │ ^^^^^^^^^
+ 23 │
+
+ i ...Which is required to end this statement
+
+ 20 │ foo satisfies unknown satisfies Bar;
+ 21 │ foo satisfies unknown as Bar;
+ > 22 │ foo as unknown satisfies Bar;
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^
+ 23 │
+
+satisfies.ts:22:26 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 20 │ foo satisfies unknown satisfies Bar;
+ 21 │ foo satisfies unknown as Bar;
+ > 22 │ foo as unknown satisfies Bar;
+ │ ^^^
+ 23 │
+
+ i An explicit or implicit semicolon is expected here...
+
+ 20 │ foo satisfies unknown satisfies Bar;
+ 21 │ foo satisfies unknown as Bar;
+ > 22 │ foo as unknown satisfies Bar;
+ │ ^^^
+ 23 │
+
+ i ...Which is required to end this statement
+
+ 20 │ foo satisfies unknown satisfies Bar;
+ 21 │ foo satisfies unknown as Bar;
+ > 22 │ foo as unknown satisfies Bar;
+ │ ^^^^^^^^^^^^^
+ 23 │
+
+
+```
+
+
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/template-literal.ts b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/template-literal.ts
new file mode 100644
index 00000000000..d4152adc97e
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/template-literal.ts
@@ -0,0 +1,5 @@
+const a = `${(foo + bar) satisfies baz}`;
+const b = `${(veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongFoo + bar) satisfies baz}`;
+const b = `${(foo + veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBar) satisfies baz}`;
+const b = `${(foo + bar) satisfies veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBaz}`;
+const b = `${(veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongFoo + veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBar) satisfies veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBaz}`;
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/template-literal.ts.prettier-snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/template-literal.ts.prettier-snap
new file mode 100644
index 00000000000..accae0b472d
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/template-literal.ts.prettier-snap
@@ -0,0 +1,14 @@
+const a = `${(foo + bar) satisfies baz}`;
+const b = `${
+ (veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongFoo + bar) satisfies baz
+}`;
+const b = `${
+ (foo + veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBar) satisfies baz
+}`;
+const b = `${
+ (foo + bar) satisfies veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBaz
+}`;
+const b = `${
+ (veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongFoo +
+ veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBar) satisfies veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBaz
+}`;
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/template-literal.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/template-literal.ts.snap
new file mode 100644
index 00000000000..9330cbfa803
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/template-literal.ts.snap
@@ -0,0 +1,136 @@
+---
+source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/satisfies-operators/template-literal.ts
+---
+
+# Input
+
+```js
+const a = `${(foo + bar) satisfies baz}`;
+const b = `${(veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongFoo + bar) satisfies baz}`;
+const b = `${(foo + veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBar) satisfies baz}`;
+const b = `${(foo + bar) satisfies veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBaz}`;
+const b = `${(veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongFoo + veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBar) satisfies veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBaz}`;
+```
+
+
+# Prettier differences
+
+```diff
+--- Prettier
++++ Rome
+@@ -1,14 +1,9 @@
+ const a = `${(foo + bar) satisfies baz}`;
+-const b = `${
+- (veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongFoo + bar) satisfies baz
+-}`;
+-const b = `${
+- (foo + veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBar) satisfies baz
+-}`;
+-const b = `${
+- (foo + bar) satisfies veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBaz
+-}`;
+-const b = `${
+- (veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongFoo +
+- veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBar) satisfies veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBaz
+-}`;
++const b =
++ `${(veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongFoo + bar) satisfies baz}`;
++const b =
++ `${(foo + veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBar) satisfies baz}`;
++const b =
++ `${(foo + bar) satisfies veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBaz}`;
++const b =
++ `${(veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongFoo + veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBar) satisfies veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBaz}`;
+```
+
+# Output
+
+```js
+const a = `${(foo + bar) satisfies baz}`;
+const b =
+ `${(veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongFoo + bar) satisfies baz}`;
+const b =
+ `${(foo + veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBar) satisfies baz}`;
+const b =
+ `${(foo + bar) satisfies veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBaz}`;
+const b =
+ `${(veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongFoo + veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBar) satisfies veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBaz}`;
+```
+
+
+# Errors
+```
+template-literal.ts:1:26 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected `}` but instead found `satisfies`
+
+ > 1 │ const a = `${(foo + bar) satisfies baz}`;
+ │ ^^^^^^^^^
+ 2 │ const b = `${(veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongFoo + bar) satisfies baz}`;
+ 3 │ const b = `${(foo + veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBar) satisfies baz}`;
+
+ i Remove satisfies
+
+template-literal.ts:2:78 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected `}` but instead found `satisfies`
+
+ 1 │ const a = `${(foo + bar) satisfies baz}`;
+ > 2 │ const b = `${(veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongFoo + bar) satisfies baz}`;
+ │ ^^^^^^^^^
+ 3 │ const b = `${(foo + veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBar) satisfies baz}`;
+ 4 │ const b = `${(foo + bar) satisfies veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBaz}`;
+
+ i Remove satisfies
+
+template-literal.ts:3:78 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected `}` but instead found `satisfies`
+
+ 1 │ const a = `${(foo + bar) satisfies baz}`;
+ 2 │ const b = `${(veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongFoo + bar) satisfies baz}`;
+ > 3 │ const b = `${(foo + veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBar) satisfies baz}`;
+ │ ^^^^^^^^^
+ 4 │ const b = `${(foo + bar) satisfies veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBaz}`;
+ 5 │ const b = `${(veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongFoo + veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBar) satisfies veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBaz}`;
+
+ i Remove satisfies
+
+template-literal.ts:4:26 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected `}` but instead found `satisfies`
+
+ 2 │ const b = `${(veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongFoo + bar) satisfies baz}`;
+ 3 │ const b = `${(foo + veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBar) satisfies baz}`;
+ > 4 │ const b = `${(foo + bar) satisfies veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBaz}`;
+ │ ^^^^^^^^^
+ 5 │ const b = `${(veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongFoo + veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBar) satisfies veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBaz}`;
+ 6 │
+
+ i Remove satisfies
+
+template-literal.ts:5:130 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected `}` but instead found `satisfies`
+
+ 3 │ const b = `${(foo + veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBar) satisfies baz}`;
+ 4 │ const b = `${(foo + bar) satisfies veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBaz}`;
+ > 5 │ const b = `${(veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongFoo + veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBar) satisfies veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBaz}`;
+ │ ^^^^^^^^^
+ 6 │
+
+ i Remove satisfies
+
+
+```
+
+# Lines exceeding max width of 80 characters
+```
+ 3: `${(veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongFoo + bar) satisfies baz}`;
+ 5: `${(foo + veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBar) satisfies baz}`;
+ 7: `${(foo + bar) satisfies veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBaz}`;
+ 9: `${(veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongFoo + veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBar) satisfies veryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongBaz}`;
+```
+
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/ternary.ts b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/ternary.ts
new file mode 100644
index 00000000000..0baab89c6c3
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/ternary.ts
@@ -0,0 +1,40 @@
+foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ ? baaaaaaaaaaaaaaaaaaaaar
+ : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo;
+
+foo = (condition ? firstValue : secondValue) satisfies SomeType;
+
+const foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ ? baaaaaaaaaaaaaaaaaaaaar
+ : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo;
+
+function foo() {
+ return (coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ ? baaaaaaaaaaaaaaaaaaaaar
+ : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo;
+}
+
+function foo() {
+ throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ ? baaaaaaaaaaaaaaaaaaaaar
+ : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo;
+}
+
+function foo() {
+ void ((coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ ? baaaaaaaaaaaaaaaaaaaaar
+ : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo);
+}
+
+bifornCringerMoshedPerplexSawder =
+ askTrovenaBeenaDependsRowans +
+ ((glimseGlyphsHazardNoopsTieTie === 0
+ ? averredBathersBoxroomBuggyNurl
+ : anodyneCondosMalateOverateRetinol) satisfies AnnularCooeedSplicesWalksWayWay);
+
+bifornCringerMoshedPerplexSawder =
+ askTrovenaBeenaDependsRowans +
+ ((glimseGlyphsHazardNoopsTieTie === 0 &&
+ kochabCooieGameOnOboleUnweave === Math.PI
+ ? averredBathersBoxroomBuggyNurl
+ : anodyneCondosMalateOverateRetinol) satisfies AnnularCooeedSplicesWalksWayWay);
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/ternary.ts.prettier-snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/ternary.ts.prettier-snap
new file mode 100644
index 00000000000..a70eea1eb1c
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/ternary.ts.prettier-snap
@@ -0,0 +1,50 @@
+foo = (
+ coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ ? baaaaaaaaaaaaaaaaaaaaar
+ : baaaaaaaaaaaaaaaaaaaaaz
+) satisfies Fooooooooooo;
+
+foo = (condition ? firstValue : secondValue) satisfies SomeType;
+
+const foo = (
+ coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ ? baaaaaaaaaaaaaaaaaaaaar
+ : baaaaaaaaaaaaaaaaaaaaaz
+) satisfies Fooooooooooo;
+
+function foo() {
+ return (
+ coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ ? baaaaaaaaaaaaaaaaaaaaar
+ : baaaaaaaaaaaaaaaaaaaaaz
+ ) satisfies Fooooooooooo;
+}
+
+function foo() {
+ throw (
+ coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ ? baaaaaaaaaaaaaaaaaaaaar
+ : baaaaaaaaaaaaaaaaaaaaaz
+ ) satisfies Fooooooooooo;
+}
+
+function foo() {
+ void ((
+ coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ ? baaaaaaaaaaaaaaaaaaaaar
+ : baaaaaaaaaaaaaaaaaaaaaz
+ ) satisfies Fooooooooooo);
+}
+
+bifornCringerMoshedPerplexSawder =
+ askTrovenaBeenaDependsRowans +
+ ((glimseGlyphsHazardNoopsTieTie === 0
+ ? averredBathersBoxroomBuggyNurl
+ : anodyneCondosMalateOverateRetinol) satisfies AnnularCooeedSplicesWalksWayWay);
+
+bifornCringerMoshedPerplexSawder =
+ askTrovenaBeenaDependsRowans +
+ ((glimseGlyphsHazardNoopsTieTie === 0 &&
+ kochabCooieGameOnOboleUnweave === Math.PI
+ ? averredBathersBoxroomBuggyNurl
+ : anodyneCondosMalateOverateRetinol) satisfies AnnularCooeedSplicesWalksWayWay);
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/ternary.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/ternary.ts.snap
new file mode 100644
index 00000000000..7e738f372f2
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/ternary.ts.snap
@@ -0,0 +1,722 @@
+---
+source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/satisfies-operators/ternary.ts
+---
+
+# Input
+
+```js
+foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ ? baaaaaaaaaaaaaaaaaaaaar
+ : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo;
+
+foo = (condition ? firstValue : secondValue) satisfies SomeType;
+
+const foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ ? baaaaaaaaaaaaaaaaaaaaar
+ : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo;
+
+function foo() {
+ return (coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ ? baaaaaaaaaaaaaaaaaaaaar
+ : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo;
+}
+
+function foo() {
+ throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ ? baaaaaaaaaaaaaaaaaaaaar
+ : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo;
+}
+
+function foo() {
+ void ((coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ ? baaaaaaaaaaaaaaaaaaaaar
+ : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo);
+}
+
+bifornCringerMoshedPerplexSawder =
+ askTrovenaBeenaDependsRowans +
+ ((glimseGlyphsHazardNoopsTieTie === 0
+ ? averredBathersBoxroomBuggyNurl
+ : anodyneCondosMalateOverateRetinol) satisfies AnnularCooeedSplicesWalksWayWay);
+
+bifornCringerMoshedPerplexSawder =
+ askTrovenaBeenaDependsRowans +
+ ((glimseGlyphsHazardNoopsTieTie === 0 &&
+ kochabCooieGameOnOboleUnweave === Math.PI
+ ? averredBathersBoxroomBuggyNurl
+ : anodyneCondosMalateOverateRetinol) satisfies AnnularCooeedSplicesWalksWayWay);
+```
+
+
+# Prettier differences
+
+```diff
+--- Prettier
++++ Rome
+@@ -1,50 +1,59 @@
+-foo = (
+- coooooooooooooooooooooooooooooooooooooooooooooooooooond
+- ? baaaaaaaaaaaaaaaaaaaaar
+- : baaaaaaaaaaaaaaaaaaaaaz
+-) satisfies Fooooooooooo;
++foo = coooooooooooooooooooooooooooooooooooooooooooooooooooond
++ ? baaaaaaaaaaaaaaaaaaaaar
++ : baaaaaaaaaaaaaaaaaaaaaz;
++satisfies;
++Fooooooooooo;
+
+-foo = (condition ? firstValue : secondValue) satisfies SomeType;
++foo = condition ? firstValue : secondValue;
++satisfies;
++SomeType;
+
+-const foo = (
+- coooooooooooooooooooooooooooooooooooooooooooooooooooond
+- ? baaaaaaaaaaaaaaaaaaaaar
+- : baaaaaaaaaaaaaaaaaaaaaz
+-) satisfies Fooooooooooo;
++const foo = coooooooooooooooooooooooooooooooooooooooooooooooooooond
++ ? baaaaaaaaaaaaaaaaaaaaar
++ : baaaaaaaaaaaaaaaaaaaaaz;
++satisfies;
++Fooooooooooo;
+
+ function foo() {
+- return (
+- coooooooooooooooooooooooooooooooooooooooooooooooooooond
+- ? baaaaaaaaaaaaaaaaaaaaar
+- : baaaaaaaaaaaaaaaaaaaaaz
+- ) satisfies Fooooooooooo;
++ return coooooooooooooooooooooooooooooooooooooooooooooooooooond
++ ? baaaaaaaaaaaaaaaaaaaaar
++ : baaaaaaaaaaaaaaaaaaaaaz;
++ satisfies;
++ Fooooooooooo;
+ }
+
+ function foo() {
+- throw (
+- coooooooooooooooooooooooooooooooooooooooooooooooooooond
+- ? baaaaaaaaaaaaaaaaaaaaar
+- : baaaaaaaaaaaaaaaaaaaaaz
+- ) satisfies Fooooooooooo;
++ throw coooooooooooooooooooooooooooooooooooooooooooooooooooond
++ ? baaaaaaaaaaaaaaaaaaaaar
++ : baaaaaaaaaaaaaaaaaaaaaz;
++ satisfies;
++ Fooooooooooo;
+ }
+
+ function foo() {
+- void ((
+- coooooooooooooooooooooooooooooooooooooooooooooooooooond
+- ? baaaaaaaaaaaaaaaaaaaaar
+- : baaaaaaaaaaaaaaaaaaaaaz
+- ) satisfies Fooooooooooo);
++ void ((coooooooooooooooooooooooooooooooooooooooooooooooooooond
++ ? baaaaaaaaaaaaaaaaaaaaar
++ : baaaaaaaaaaaaaaaaaaaaaz)
++ satisfies;
++ Fooooooooooo;
++ )
+ }
+
+ bifornCringerMoshedPerplexSawder =
+ askTrovenaBeenaDependsRowans +
+ ((glimseGlyphsHazardNoopsTieTie === 0
+ ? averredBathersBoxroomBuggyNurl
+- : anodyneCondosMalateOverateRetinol) satisfies AnnularCooeedSplicesWalksWayWay);
++ : anodyneCondosMalateOverateRetinol)
++satisfies;
++AnnularCooeedSplicesWalksWayWay;
++)
+
+ bifornCringerMoshedPerplexSawder =
+ askTrovenaBeenaDependsRowans +
+ ((glimseGlyphsHazardNoopsTieTie === 0 &&
+ kochabCooieGameOnOboleUnweave === Math.PI
+ ? averredBathersBoxroomBuggyNurl
+- : anodyneCondosMalateOverateRetinol) satisfies AnnularCooeedSplicesWalksWayWay);
++ : anodyneCondosMalateOverateRetinol)
++satisfies;
++AnnularCooeedSplicesWalksWayWay;
++)
+```
+
+# Output
+
+```js
+foo = coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ ? baaaaaaaaaaaaaaaaaaaaar
+ : baaaaaaaaaaaaaaaaaaaaaz;
+satisfies;
+Fooooooooooo;
+
+foo = condition ? firstValue : secondValue;
+satisfies;
+SomeType;
+
+const foo = coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ ? baaaaaaaaaaaaaaaaaaaaar
+ : baaaaaaaaaaaaaaaaaaaaaz;
+satisfies;
+Fooooooooooo;
+
+function foo() {
+ return coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ ? baaaaaaaaaaaaaaaaaaaaar
+ : baaaaaaaaaaaaaaaaaaaaaz;
+ satisfies;
+ Fooooooooooo;
+}
+
+function foo() {
+ throw coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ ? baaaaaaaaaaaaaaaaaaaaar
+ : baaaaaaaaaaaaaaaaaaaaaz;
+ satisfies;
+ Fooooooooooo;
+}
+
+function foo() {
+ void ((coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ ? baaaaaaaaaaaaaaaaaaaaar
+ : baaaaaaaaaaaaaaaaaaaaaz)
+ satisfies;
+ Fooooooooooo;
+ )
+}
+
+bifornCringerMoshedPerplexSawder =
+ askTrovenaBeenaDependsRowans +
+ ((glimseGlyphsHazardNoopsTieTie === 0
+ ? averredBathersBoxroomBuggyNurl
+ : anodyneCondosMalateOverateRetinol)
+satisfies;
+AnnularCooeedSplicesWalksWayWay;
+)
+
+bifornCringerMoshedPerplexSawder =
+ askTrovenaBeenaDependsRowans +
+ ((glimseGlyphsHazardNoopsTieTie === 0 &&
+ kochabCooieGameOnOboleUnweave === Math.PI
+ ? averredBathersBoxroomBuggyNurl
+ : anodyneCondosMalateOverateRetinol)
+satisfies;
+AnnularCooeedSplicesWalksWayWay;
+)
+```
+
+
+# Errors
+```
+ternary.ts:3:32 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 1 │ foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ 2 │ ? baaaaaaaaaaaaaaaaaaaaar
+ > 3 │ : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo;
+ │ ^^^^^^^^^
+ 4 │
+ 5 │ foo = (condition ? firstValue : secondValue) satisfies SomeType;
+
+ i An explicit or implicit semicolon is expected here...
+
+ 1 │ foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ 2 │ ? baaaaaaaaaaaaaaaaaaaaar
+ > 3 │ : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo;
+ │ ^^^^^^^^^
+ 4 │
+ 5 │ foo = (condition ? firstValue : secondValue) satisfies SomeType;
+
+ i ...Which is required to end this statement
+
+ > 1 │ foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ > 2 │ ? baaaaaaaaaaaaaaaaaaaaar
+ > 3 │ : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo;
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ 4 │
+ 5 │ foo = (condition ? firstValue : secondValue) satisfies SomeType;
+
+ternary.ts:3:42 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 1 │ foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ 2 │ ? baaaaaaaaaaaaaaaaaaaaar
+ > 3 │ : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo;
+ │ ^^^^^^^^^^^^
+ 4 │
+ 5 │ foo = (condition ? firstValue : secondValue) satisfies SomeType;
+
+ i An explicit or implicit semicolon is expected here...
+
+ 1 │ foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ 2 │ ? baaaaaaaaaaaaaaaaaaaaar
+ > 3 │ : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo;
+ │ ^^^^^^^^^^^^
+ 4 │
+ 5 │ foo = (condition ? firstValue : secondValue) satisfies SomeType;
+
+ i ...Which is required to end this statement
+
+ 1 │ foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ 2 │ ? baaaaaaaaaaaaaaaaaaaaar
+ > 3 │ : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo;
+ │ ^^^^^^^^^^^^^^^^^^^^^^
+ 4 │
+ 5 │ foo = (condition ? firstValue : secondValue) satisfies SomeType;
+
+ternary.ts:5:46 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 3 │ : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo;
+ 4 │
+ > 5 │ foo = (condition ? firstValue : secondValue) satisfies SomeType;
+ │ ^^^^^^^^^
+ 6 │
+ 7 │ const foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond
+
+ i An explicit or implicit semicolon is expected here...
+
+ 3 │ : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo;
+ 4 │
+ > 5 │ foo = (condition ? firstValue : secondValue) satisfies SomeType;
+ │ ^^^^^^^^^
+ 6 │
+ 7 │ const foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond
+
+ i ...Which is required to end this statement
+
+ 3 │ : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo;
+ 4 │
+ > 5 │ foo = (condition ? firstValue : secondValue) satisfies SomeType;
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ 6 │
+ 7 │ const foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond
+
+ternary.ts:5:56 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 3 │ : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo;
+ 4 │
+ > 5 │ foo = (condition ? firstValue : secondValue) satisfies SomeType;
+ │ ^^^^^^^^
+ 6 │
+ 7 │ const foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond
+
+ i An explicit or implicit semicolon is expected here...
+
+ 3 │ : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo;
+ 4 │
+ > 5 │ foo = (condition ? firstValue : secondValue) satisfies SomeType;
+ │ ^^^^^^^^
+ 6 │
+ 7 │ const foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond
+
+ i ...Which is required to end this statement
+
+ 3 │ : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo;
+ 4 │
+ > 5 │ foo = (condition ? firstValue : secondValue) satisfies SomeType;
+ │ ^^^^^^^^^^^^^^^^^^
+ 6 │
+ 7 │ const foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond
+
+ternary.ts:9:30 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 7 │ const foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ 8 │ ? baaaaaaaaaaaaaaaaaaaaar
+ > 9 │ : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo;
+ │ ^^^^^^^^^
+ 10 │
+ 11 │ function foo() {
+
+ i An explicit or implicit semicolon is expected here...
+
+ 7 │ const foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ 8 │ ? baaaaaaaaaaaaaaaaaaaaar
+ > 9 │ : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo;
+ │ ^^^^^^^^^
+ 10 │
+ 11 │ function foo() {
+
+ i ...Which is required to end this statement
+
+ 5 │ foo = (condition ? firstValue : secondValue) satisfies SomeType;
+ 6 │
+ > 7 │ const foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ > 8 │ ? baaaaaaaaaaaaaaaaaaaaar
+ > 9 │ : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo;
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ 10 │
+ 11 │ function foo() {
+
+ternary.ts:9:40 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 7 │ const foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ 8 │ ? baaaaaaaaaaaaaaaaaaaaar
+ > 9 │ : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo;
+ │ ^^^^^^^^^^^^
+ 10 │
+ 11 │ function foo() {
+
+ i An explicit or implicit semicolon is expected here...
+
+ 7 │ const foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ 8 │ ? baaaaaaaaaaaaaaaaaaaaar
+ > 9 │ : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo;
+ │ ^^^^^^^^^^^^
+ 10 │
+ 11 │ function foo() {
+
+ i ...Which is required to end this statement
+
+ 7 │ const foo = (coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ 8 │ ? baaaaaaaaaaaaaaaaaaaaar
+ > 9 │ : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo;
+ │ ^^^^^^^^^^^^^^^^^^^^^^
+ 10 │
+ 11 │ function foo() {
+
+ternary.ts:14:32 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 12 │ return (coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ 13 │ ? baaaaaaaaaaaaaaaaaaaaar
+ > 14 │ : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo;
+ │ ^^^^^^^^^
+ 15 │ }
+ 16 │
+
+ i An explicit or implicit semicolon is expected here...
+
+ 12 │ return (coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ 13 │ ? baaaaaaaaaaaaaaaaaaaaar
+ > 14 │ : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo;
+ │ ^^^^^^^^^
+ 15 │ }
+ 16 │
+
+ i ...Which is required to end this statement
+
+ 11 │ function foo() {
+ > 12 │ return (coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ > 13 │ ? baaaaaaaaaaaaaaaaaaaaar
+ > 14 │ : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo;
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ 15 │ }
+ 16 │
+
+ternary.ts:14:42 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 12 │ return (coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ 13 │ ? baaaaaaaaaaaaaaaaaaaaar
+ > 14 │ : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo;
+ │ ^^^^^^^^^^^^
+ 15 │ }
+ 16 │
+
+ i An explicit or implicit semicolon is expected here...
+
+ 12 │ return (coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ 13 │ ? baaaaaaaaaaaaaaaaaaaaar
+ > 14 │ : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo;
+ │ ^^^^^^^^^^^^
+ 15 │ }
+ 16 │
+
+ i ...Which is required to end this statement
+
+ 12 │ return (coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ 13 │ ? baaaaaaaaaaaaaaaaaaaaar
+ > 14 │ : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo;
+ │ ^^^^^^^^^^^^^^^^^^^^^^
+ 15 │ }
+ 16 │
+
+ternary.ts:20:34 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 18 │ throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ 19 │ ? baaaaaaaaaaaaaaaaaaaaar
+ > 20 │ : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo;
+ │ ^^^^^^^^^
+ 21 │ }
+ 22 │
+
+ i An explicit or implicit semicolon is expected here...
+
+ 18 │ throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ 19 │ ? baaaaaaaaaaaaaaaaaaaaar
+ > 20 │ : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo;
+ │ ^^^^^^^^^
+ 21 │ }
+ 22 │
+
+ i ...Which is required to end this statement
+
+ 17 │ function foo() {
+ > 18 │ throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ > 19 │ ? baaaaaaaaaaaaaaaaaaaaar
+ > 20 │ : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo;
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ 21 │ }
+ 22 │
+
+ternary.ts:20:44 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 18 │ throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ 19 │ ? baaaaaaaaaaaaaaaaaaaaar
+ > 20 │ : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo;
+ │ ^^^^^^^^^^^^
+ 21 │ }
+ 22 │
+
+ i An explicit or implicit semicolon is expected here...
+
+ 18 │ throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ 19 │ ? baaaaaaaaaaaaaaaaaaaaar
+ > 20 │ : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo;
+ │ ^^^^^^^^^^^^
+ 21 │ }
+ 22 │
+
+ i ...Which is required to end this statement
+
+ 18 │ throw (coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ 19 │ ? baaaaaaaaaaaaaaaaaaaaar
+ > 20 │ : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo;
+ │ ^^^^^^^^^^^^^^^^^^^^^^
+ 21 │ }
+ 22 │
+
+ternary.ts:26:32 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected `)` but instead found `satisfies`
+
+ 24 │ void ((coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ 25 │ ? baaaaaaaaaaaaaaaaaaaaar
+ > 26 │ : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo);
+ │ ^^^^^^^^^
+ 27 │ }
+ 28 │
+
+ i Remove satisfies
+
+ternary.ts:26:42 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 24 │ void ((coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ 25 │ ? baaaaaaaaaaaaaaaaaaaaar
+ > 26 │ : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo);
+ │ ^^^^^^^^^^^^
+ 27 │ }
+ 28 │
+
+ i An explicit or implicit semicolon is expected here...
+
+ 24 │ void ((coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ 25 │ ? baaaaaaaaaaaaaaaaaaaaar
+ > 26 │ : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo);
+ │ ^^^^^^^^^^^^
+ 27 │ }
+ 28 │
+
+ i ...Which is required to end this statement
+
+ 24 │ void ((coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ 25 │ ? baaaaaaaaaaaaaaaaaaaaar
+ > 26 │ : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo);
+ │ ^^^^^^^^^^^^^^^^^^^^^^
+ 27 │ }
+ 28 │
+
+ternary.ts:26:54 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 24 │ void ((coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ 25 │ ? baaaaaaaaaaaaaaaaaaaaar
+ > 26 │ : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo);
+ │ ^
+ 27 │ }
+ 28 │
+
+ i An explicit or implicit semicolon is expected here...
+
+ 24 │ void ((coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ 25 │ ? baaaaaaaaaaaaaaaaaaaaar
+ > 26 │ : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo);
+ │ ^
+ 27 │ }
+ 28 │
+
+ i ...Which is required to end this statement
+
+ 24 │ void ((coooooooooooooooooooooooooooooooooooooooooooooooooooond
+ 25 │ ? baaaaaaaaaaaaaaaaaaaaar
+ > 26 │ : baaaaaaaaaaaaaaaaaaaaaz) satisfies Fooooooooooo);
+ │ ^^^^^^^^^^^^^
+ 27 │ }
+ 28 │
+
+ternary.ts:33:42 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected `)` but instead found `satisfies`
+
+ 31 │ ((glimseGlyphsHazardNoopsTieTie === 0
+ 32 │ ? averredBathersBoxroomBuggyNurl
+ > 33 │ : anodyneCondosMalateOverateRetinol) satisfies AnnularCooeedSplicesWalksWayWay);
+ │ ^^^^^^^^^
+ 34 │
+ 35 │ bifornCringerMoshedPerplexSawder =
+
+ i Remove satisfies
+
+ternary.ts:33:52 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 31 │ ((glimseGlyphsHazardNoopsTieTie === 0
+ 32 │ ? averredBathersBoxroomBuggyNurl
+ > 33 │ : anodyneCondosMalateOverateRetinol) satisfies AnnularCooeedSplicesWalksWayWay);
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ 34 │
+ 35 │ bifornCringerMoshedPerplexSawder =
+
+ i An explicit or implicit semicolon is expected here...
+
+ 31 │ ((glimseGlyphsHazardNoopsTieTie === 0
+ 32 │ ? averredBathersBoxroomBuggyNurl
+ > 33 │ : anodyneCondosMalateOverateRetinol) satisfies AnnularCooeedSplicesWalksWayWay);
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ 34 │
+ 35 │ bifornCringerMoshedPerplexSawder =
+
+ i ...Which is required to end this statement
+
+ 31 │ ((glimseGlyphsHazardNoopsTieTie === 0
+ 32 │ ? averredBathersBoxroomBuggyNurl
+ > 33 │ : anodyneCondosMalateOverateRetinol) satisfies AnnularCooeedSplicesWalksWayWay);
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ 34 │
+ 35 │ bifornCringerMoshedPerplexSawder =
+
+ternary.ts:33:83 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 31 │ ((glimseGlyphsHazardNoopsTieTie === 0
+ 32 │ ? averredBathersBoxroomBuggyNurl
+ > 33 │ : anodyneCondosMalateOverateRetinol) satisfies AnnularCooeedSplicesWalksWayWay);
+ │ ^
+ 34 │
+ 35 │ bifornCringerMoshedPerplexSawder =
+
+ i An explicit or implicit semicolon is expected here...
+
+ 31 │ ((glimseGlyphsHazardNoopsTieTie === 0
+ 32 │ ? averredBathersBoxroomBuggyNurl
+ > 33 │ : anodyneCondosMalateOverateRetinol) satisfies AnnularCooeedSplicesWalksWayWay);
+ │ ^
+ 34 │
+ 35 │ bifornCringerMoshedPerplexSawder =
+
+ i ...Which is required to end this statement
+
+ 31 │ ((glimseGlyphsHazardNoopsTieTie === 0
+ 32 │ ? averredBathersBoxroomBuggyNurl
+ > 33 │ : anodyneCondosMalateOverateRetinol) satisfies AnnularCooeedSplicesWalksWayWay);
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ 34 │
+ 35 │ bifornCringerMoshedPerplexSawder =
+
+ternary.ts:40:42 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected `)` but instead found `satisfies`
+
+ 38 │ kochabCooieGameOnOboleUnweave === Math.PI
+ 39 │ ? averredBathersBoxroomBuggyNurl
+ > 40 │ : anodyneCondosMalateOverateRetinol) satisfies AnnularCooeedSplicesWalksWayWay);
+ │ ^^^^^^^^^
+ 41 │
+
+ i Remove satisfies
+
+ternary.ts:40:52 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 38 │ kochabCooieGameOnOboleUnweave === Math.PI
+ 39 │ ? averredBathersBoxroomBuggyNurl
+ > 40 │ : anodyneCondosMalateOverateRetinol) satisfies AnnularCooeedSplicesWalksWayWay);
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ 41 │
+
+ i An explicit or implicit semicolon is expected here...
+
+ 38 │ kochabCooieGameOnOboleUnweave === Math.PI
+ 39 │ ? averredBathersBoxroomBuggyNurl
+ > 40 │ : anodyneCondosMalateOverateRetinol) satisfies AnnularCooeedSplicesWalksWayWay);
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ 41 │
+
+ i ...Which is required to end this statement
+
+ 38 │ kochabCooieGameOnOboleUnweave === Math.PI
+ 39 │ ? averredBathersBoxroomBuggyNurl
+ > 40 │ : anodyneCondosMalateOverateRetinol) satisfies AnnularCooeedSplicesWalksWayWay);
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ 41 │
+
+ternary.ts:40:83 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 38 │ kochabCooieGameOnOboleUnweave === Math.PI
+ 39 │ ? averredBathersBoxroomBuggyNurl
+ > 40 │ : anodyneCondosMalateOverateRetinol) satisfies AnnularCooeedSplicesWalksWayWay);
+ │ ^
+ 41 │
+
+ i An explicit or implicit semicolon is expected here...
+
+ 38 │ kochabCooieGameOnOboleUnweave === Math.PI
+ 39 │ ? averredBathersBoxroomBuggyNurl
+ > 40 │ : anodyneCondosMalateOverateRetinol) satisfies AnnularCooeedSplicesWalksWayWay);
+ │ ^
+ 41 │
+
+ i ...Which is required to end this statement
+
+ 38 │ kochabCooieGameOnOboleUnweave === Math.PI
+ 39 │ ? averredBathersBoxroomBuggyNurl
+ > 40 │ : anodyneCondosMalateOverateRetinol) satisfies AnnularCooeedSplicesWalksWayWay);
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ 41 │
+
+
+```
+
+
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/types-comments.ts b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/types-comments.ts
new file mode 100644
index 00000000000..8ef9413c2a3
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/types-comments.ts
@@ -0,0 +1,3 @@
+(() => {
+ // swallow error and fallback to using directory as path
+}) satisfies string[];
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/types-comments.ts.prettier-snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/types-comments.ts.prettier-snap
new file mode 100644
index 00000000000..8ef9413c2a3
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/types-comments.ts.prettier-snap
@@ -0,0 +1,3 @@
+(() => {
+ // swallow error and fallback to using directory as path
+}) satisfies string[];
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/types-comments.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/types-comments.ts.snap
new file mode 100644
index 00000000000..8786b597f14
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/satisfies-operators/types-comments.ts.snap
@@ -0,0 +1,118 @@
+---
+source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/satisfies-operators/types-comments.ts
+---
+
+# Input
+
+```js
+(() => {
+ // swallow error and fallback to using directory as path
+}) satisfies string[];
+```
+
+
+# Prettier differences
+
+```diff
+--- Prettier
++++ Rome
+@@ -1,3 +1,5 @@
+-(() => {
++() => {
+ // swallow error and fallback to using directory as path
+-}) satisfies string[];
++};
++satisfies;
++string[];
+```
+
+# Output
+
+```js
+() => {
+ // swallow error and fallback to using directory as path
+};
+satisfies;
+string[];
+```
+
+
+# Errors
+```
+types-comments.ts:3:4 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 1 │ (() => {
+ 2 │ // swallow error and fallback to using directory as path
+ > 3 │ }) satisfies string[];
+ │ ^^^^^^^^^
+ 4 │
+
+ i An explicit or implicit semicolon is expected here...
+
+ 1 │ (() => {
+ 2 │ // swallow error and fallback to using directory as path
+ > 3 │ }) satisfies string[];
+ │ ^^^^^^^^^
+ 4 │
+
+ i ...Which is required to end this statement
+
+ > 1 │ (() => {
+ │ ^^^^^^^^
+ > 2 │ // swallow error and fallback to using directory as path
+ > 3 │ }) satisfies string[];
+ │ ^^^^^^^^^^^^
+ 4 │
+
+types-comments.ts:3:14 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × Expected a semicolon or an implicit semicolon after a statement, but found none
+
+ 1 │ (() => {
+ 2 │ // swallow error and fallback to using directory as path
+ > 3 │ }) satisfies string[];
+ │ ^^^^^^
+ 4 │
+
+ i An explicit or implicit semicolon is expected here...
+
+ 1 │ (() => {
+ 2 │ // swallow error and fallback to using directory as path
+ > 3 │ }) satisfies string[];
+ │ ^^^^^^
+ 4 │
+
+ i ...Which is required to end this statement
+
+ 1 │ (() => {
+ 2 │ // swallow error and fallback to using directory as path
+ > 3 │ }) satisfies string[];
+ │ ^^^^^^^^^^^^^^^^
+ 4 │
+
+types-comments.ts:3:21 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected an expression but instead found ']'
+
+ 1 │ (() => {
+ 2 │ // swallow error and fallback to using directory as path
+ > 3 │ }) satisfies string[];
+ │ ^
+ 4 │
+
+ i Expected an expression here
+
+ 1 │ (() => {
+ 2 │ // swallow error and fallback to using directory as path
+ > 3 │ }) satisfies string[];
+ │ ^
+ 4 │
+
+
+```
+
+
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/semi/no-semi.ts b/crates/rome_js_formatter/tests/specs/prettier/typescript/semi/no-semi.ts
new file mode 100644
index 00000000000..8a32ed4904f
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/semi/no-semi.ts
@@ -0,0 +1,9 @@
+export class Mutation {
+ private set: NQuad[];
+ private delete: NQuad[];
+}
+
+class Foo {
+ prop1 = 0;
+ [key: string]: any;
+}
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/semi/no-semi.ts.prettier-snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/semi/no-semi.ts.prettier-snap
new file mode 100644
index 00000000000..8a32ed4904f
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/semi/no-semi.ts.prettier-snap
@@ -0,0 +1,9 @@
+export class Mutation {
+ private set: NQuad[];
+ private delete: NQuad[];
+}
+
+class Foo {
+ prop1 = 0;
+ [key: string]: any;
+}
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/test-declarations/test_declarations.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/test-declarations/test_declarations.ts.snap
index 538f3508e36..eea3e1e27b3 100644
--- a/crates/rome_js_formatter/tests/specs/prettier/typescript/test-declarations/test_declarations.ts.snap
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/test-declarations/test_declarations.ts.snap
@@ -1,5 +1,7 @@
---
source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/test-declarations/test_declarations.ts
---
# Input
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/trailing-comma/arrow-functions.tsx b/crates/rome_js_formatter/tests/specs/prettier/typescript/trailing-comma/arrow-functions.tsx
new file mode 100644
index 00000000000..a1555939a25
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/trailing-comma/arrow-functions.tsx
@@ -0,0 +1,4 @@
+const f1 = () => 1;
+const f2 = <
+ Tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt,
+>() => 1;
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/trailing-comma/arrow-functions.tsx.prettier-snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/trailing-comma/arrow-functions.tsx.prettier-snap
new file mode 100644
index 00000000000..a35bfe5a7c3
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/trailing-comma/arrow-functions.tsx.prettier-snap
@@ -0,0 +1,4 @@
+const f1 = () => 1;
+const f2 = <
+ Tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt,
+>() => 1;
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/trailing-comma/arrow-functions.tsx.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/trailing-comma/arrow-functions.tsx.snap
new file mode 100644
index 00000000000..1642ebd5f37
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/trailing-comma/arrow-functions.tsx.snap
@@ -0,0 +1,40 @@
+---
+source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/trailing-comma/arrow-functions.tsx
+---
+
+# Input
+
+```js
+const f1 = () => 1;
+const f2 = <
+ Tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt,
+>() => 1;
+```
+
+
+# Prettier differences
+
+```diff
+--- Prettier
++++ Rome
+@@ -1,4 +1,4 @@
+-const f1 = () => 1;
++const f1 = () => 1;
+ const f2 = <
+ Tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt,
+ >() => 1;
+```
+
+# Output
+
+```js
+const f1 = () => 1;
+const f2 = <
+ Tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt,
+>() => 1;
+```
+
+
+
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/trailing-comma/trailing.ts b/crates/rome_js_formatter/tests/specs/prettier/typescript/trailing-comma/trailing.ts
new file mode 100644
index 00000000000..11c7202b52e
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/trailing-comma/trailing.ts
@@ -0,0 +1,16 @@
+export class BaseSingleLevelProfileTargeting<
+ T extends ValidSingleLevelProfileNode,
+> {
+}
+
+enum Enum {
+ x = 1,
+ y = 2,
+}
+
+const {
+ longKeySoThisWillGoOnMultipleLines,
+ longKeySoThisWillGoOnMultipleLines2,
+ longKeySoThisWillGoOnMultipleLines3,
+ ...rest,
+} = something;
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/trailing-comma/trailing.ts.prettier-snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/trailing-comma/trailing.ts.prettier-snap
new file mode 100644
index 00000000000..e9bf08d5a19
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/trailing-comma/trailing.ts.prettier-snap
@@ -0,0 +1,15 @@
+export class BaseSingleLevelProfileTargeting<
+ T extends ValidSingleLevelProfileNode,
+> {}
+
+enum Enum {
+ x = 1,
+ y = 2,
+}
+
+const {
+ longKeySoThisWillGoOnMultipleLines,
+ longKeySoThisWillGoOnMultipleLines2,
+ longKeySoThisWillGoOnMultipleLines3,
+ ...rest
+} = something;
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/trailing-comma/trailing.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/trailing-comma/trailing.ts.snap
new file mode 100644
index 00000000000..9bf800a9ced
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/trailing-comma/trailing.ts.snap
@@ -0,0 +1,98 @@
+---
+source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/trailing-comma/trailing.ts
+---
+
+# Input
+
+```js
+export class BaseSingleLevelProfileTargeting<
+ T extends ValidSingleLevelProfileNode,
+> {
+}
+
+enum Enum {
+ x = 1,
+ y = 2,
+}
+
+const {
+ longKeySoThisWillGoOnMultipleLines,
+ longKeySoThisWillGoOnMultipleLines2,
+ longKeySoThisWillGoOnMultipleLines3,
+ ...rest,
+} = something;
+```
+
+
+# Prettier differences
+
+```diff
+--- Prettier
++++ Rome
+@@ -11,5 +11,5 @@
+ longKeySoThisWillGoOnMultipleLines,
+ longKeySoThisWillGoOnMultipleLines2,
+ longKeySoThisWillGoOnMultipleLines3,
+- ...rest
++ ...rest,
+ } = something;
+```
+
+# Output
+
+```js
+export class BaseSingleLevelProfileTargeting<
+ T extends ValidSingleLevelProfileNode,
+> {}
+
+enum Enum {
+ x = 1,
+ y = 2,
+}
+
+const {
+ longKeySoThisWillGoOnMultipleLines,
+ longKeySoThisWillGoOnMultipleLines2,
+ longKeySoThisWillGoOnMultipleLines3,
+ ...rest,
+} = something;
+```
+
+
+# Errors
+```
+trailing.ts:15:10 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × rest element may not have a trailing comma
+
+ 13 │ longKeySoThisWillGoOnMultipleLines2,
+ 14 │ longKeySoThisWillGoOnMultipleLines3,
+ > 15 │ ...rest,
+ │ ^
+ 16 │ } = something;
+ 17 │
+
+ i Remove the trailing comma here
+
+ 13 │ longKeySoThisWillGoOnMultipleLines2,
+ 14 │ longKeySoThisWillGoOnMultipleLines3,
+ > 15 │ ...rest,
+ │ ^
+ 16 │ } = something;
+ 17 │
+
+ i Rest element
+
+ 13 │ longKeySoThisWillGoOnMultipleLines2,
+ 14 │ longKeySoThisWillGoOnMultipleLines3,
+ > 15 │ ...rest,
+ │ ^^^^^^^
+ 16 │ } = something;
+ 17 │
+
+
+```
+
+
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/trailing-comma/type-arguments.ts b/crates/rome_js_formatter/tests/specs/prettier/typescript/trailing-comma/type-arguments.ts
new file mode 100644
index 00000000000..84a9e915d31
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/trailing-comma/type-arguments.ts
@@ -0,0 +1,15 @@
+var bar: Bar<
+ AAAAAAA,
+ BBBBBBB,
+ CCCCCCC,
+ DDDDDDD,
+ EEEEEEE,
+ FFFFFFF,
+ GGGGGGG,
+ HHHHHHH
+>;
+
+const baz = new Array<
+ FooFooFooFooFooFooFooFooFooFooFooFooFooFooFoo,
+ BarBarBarBarBarBarBarBarBarBarBarBarBarBarBar
+>();
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/trailing-comma/type-arguments.ts.prettier-snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/trailing-comma/type-arguments.ts.prettier-snap
new file mode 100644
index 00000000000..84a9e915d31
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/trailing-comma/type-arguments.ts.prettier-snap
@@ -0,0 +1,15 @@
+var bar: Bar<
+ AAAAAAA,
+ BBBBBBB,
+ CCCCCCC,
+ DDDDDDD,
+ EEEEEEE,
+ FFFFFFF,
+ GGGGGGG,
+ HHHHHHH
+>;
+
+const baz = new Array<
+ FooFooFooFooFooFooFooFooFooFooFooFooFooFooFoo,
+ BarBarBarBarBarBarBarBarBarBarBarBarBarBarBar
+>();
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/trailing-comma/type-parameters-vs-arguments.ts b/crates/rome_js_formatter/tests/specs/prettier/typescript/trailing-comma/type-parameters-vs-arguments.ts
new file mode 100644
index 00000000000..8d5ac46d62c
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/trailing-comma/type-parameters-vs-arguments.ts
@@ -0,0 +1,15 @@
+class FooClass<
+ A,
+ B,
+ C,
+> {
+ a: A;
+ b: B;
+ c: C;
+}
+
+const instance = new FooClass<
+ boolean,
+ number,
+ string, // [ts] Trailing comma not allowed.
+ >();
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/trailing-comma/type-parameters-vs-arguments.ts.prettier-snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/trailing-comma/type-parameters-vs-arguments.ts.prettier-snap
new file mode 100644
index 00000000000..c03ae76b74f
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/trailing-comma/type-parameters-vs-arguments.ts.prettier-snap
@@ -0,0 +1,11 @@
+class FooClass {
+ a: A;
+ b: B;
+ c: C;
+}
+
+const instance = new FooClass<
+ boolean,
+ number,
+ string // [ts] Trailing comma not allowed.
+>();
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/trailing-comma/type-parameters-vs-arguments.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/trailing-comma/type-parameters-vs-arguments.ts.snap
new file mode 100644
index 00000000000..8dde83a7e6b
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/trailing-comma/type-parameters-vs-arguments.ts.snap
@@ -0,0 +1,64 @@
+---
+source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/trailing-comma/type-parameters-vs-arguments.ts
+---
+
+# Input
+
+```js
+class FooClass<
+ A,
+ B,
+ C,
+> {
+ a: A;
+ b: B;
+ c: C;
+}
+
+const instance = new FooClass<
+ boolean,
+ number,
+ string, // [ts] Trailing comma not allowed.
+ >();
+```
+
+
+# Prettier differences
+
+```diff
+--- Prettier
++++ Rome
+@@ -5,7 +5,7 @@
+ }
+
+ const instance = new FooClass<
+- boolean,
+- number,
+- string // [ts] Trailing comma not allowed.
+->();
++ boolean,
++ number,
++ string, // [ts] Trailing comma not allowed.
++ >();
+```
+
+# Output
+
+```js
+class FooClass {
+ a: A;
+ b: B;
+ c: C;
+}
+
+const instance = new FooClass<
+ boolean,
+ number,
+ string, // [ts] Trailing comma not allowed.
+ >();
+```
+
+
+
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/tsx/type-parameters.tsx.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/tsx/type-parameters.tsx.snap
index fa1583b750c..11b340b0688 100644
--- a/crates/rome_js_formatter/tests/specs/prettier/typescript/tsx/type-parameters.tsx.snap
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/tsx/type-parameters.tsx.snap
@@ -1,5 +1,7 @@
---
source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/tsx/type-parameters.tsx
---
# Input
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/type-arguments-bit-shift-left-like/1.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/type-arguments-bit-shift-left-like/1.ts.snap
index 6d63a3a07df..189c78ffadd 100644
--- a/crates/rome_js_formatter/tests/specs/prettier/typescript/type-arguments-bit-shift-left-like/1.ts.snap
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/type-arguments-bit-shift-left-like/1.ts.snap
@@ -1,5 +1,7 @@
---
source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/type-arguments-bit-shift-left-like/1.ts
---
# Input
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/typeparams/print-width-120/issue-7542.ts b/crates/rome_js_formatter/tests/specs/prettier/typescript/typeparams/print-width-120/issue-7542.ts
new file mode 100644
index 00000000000..b340165235c
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/typeparams/print-width-120/issue-7542.ts
@@ -0,0 +1,19 @@
+export const Foo = forwardRef((props: FooProps, ref: Ref): JSX.Element => {
+ return ;
+});
+
+export const Bar = forwardRef((props: BarProps, ref: Ref): JSX.Element | null => {
+ return ;
+});
+
+users.map((user: User): User => {
+ return user;
+})
+
+users.map((user: User): User => {
+ ; // comment
+})
+
+users.map((user: User): User => {
+ // comment
+})
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/typeparams/print-width-120/issue-7542.ts.prettier-snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/typeparams/print-width-120/issue-7542.ts.prettier-snap
new file mode 100644
index 00000000000..11340dee601
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/typeparams/print-width-120/issue-7542.ts.prettier-snap
@@ -0,0 +1,23 @@
+export const Foo = forwardRef(
+ (props: FooProps, ref: Ref): JSX.Element => {
+ return ;
+ },
+);
+
+export const Bar = forwardRef(
+ (props: BarProps, ref: Ref): JSX.Element | null => {
+ return ;
+ },
+);
+
+users.map((user: User): User => {
+ return user;
+});
+
+users.map((user: User): User => {
+ // comment
+});
+
+users.map((user: User): User => {
+ // comment
+});
diff --git a/crates/rome_js_formatter/tests/specs/prettier/typescript/typeparams/print-width-120/issue-7542.ts.snap b/crates/rome_js_formatter/tests/specs/prettier/typescript/typeparams/print-width-120/issue-7542.ts.snap
new file mode 100644
index 00000000000..6f667ab676a
--- /dev/null
+++ b/crates/rome_js_formatter/tests/specs/prettier/typescript/typeparams/print-width-120/issue-7542.ts.snap
@@ -0,0 +1,166 @@
+---
+source: crates/rome_js_formatter/tests/prettier_tests.rs
+info:
+ test_file: typescript/typeparams/print-width-120/issue-7542.ts
+---
+
+# Input
+
+```js
+export const Foo = forwardRef((props: FooProps, ref: Ref): JSX.Element => {
+ return ;
+});
+
+export const Bar = forwardRef((props: BarProps, ref: Ref): JSX.Element | null => {
+ return ;
+});
+
+users.map((user: User): User => {
+ return user;
+})
+
+users.map((user: User): User => {
+ ; // comment
+})
+
+users.map((user: User): User => {
+ // comment
+})
+```
+
+
+# Prettier differences
+
+```diff
+--- Prettier
++++ Rome
+@@ -14,9 +14,11 @@
+ return user;
+ });
+
+-users.map((user: User): User => {
+- // comment
+-});
++users.map(
++ (user: User): User => {
++ // comment
++ },
++);
+
+ users.map((user: User): User => {
+ // comment
+```
+
+# Output
+
+```js
+export const Foo = forwardRef(
+ (props: FooProps, ref: Ref): JSX.Element => {
+ return ;
+ },
+);
+
+export const Bar = forwardRef(
+ (props: BarProps, ref: Ref): JSX.Element | null => {
+ return ;
+ },
+);
+
+users.map((user: User): User => {
+ return user;
+});
+
+users.map(
+ (user: User): User => {
+ // comment
+ },
+);
+
+users.map((user: User): User => {
+ // comment
+});
+```
+
+
+# Errors
+```
+issue-7542.ts:2:15 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected `>` but instead found `/`
+
+ 1 │ export const Foo = forwardRef((props: FooProps, ref: Ref): JSX.Element => {
+ > 2 │ return ;
+ │ ^
+ 3 │ });
+ 4 │
+
+ i Remove /
+
+issue-7542.ts:6:15 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × expected `>` but instead found `/`
+
+ 5 │ export const Bar = forwardRef((props: BarProps, ref: Ref): JSX.Element | null => {
+ > 6 │ return ;
+ │ ^
+ 7 │ });
+ 8 │
+
+ i Remove /
+
+issue-7542.ts:2:18 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × unterminated regex literal
+
+ 1 │ export const Foo = forwardRef((props: FooProps, ref: Ref): JSX.Element => {
+ > 2 │ return ;
+ │
+ 3 │ });
+ 4 │
+
+ i ...but the line ends here
+
+ 1 │ export const Foo = forwardRef((props: FooProps, ref: Ref): JSX.Element => {
+ > 2 │ return ;
+ │
+ 3 │ });
+ 4 │
+
+ i a regex literal starts there...
+
+ 1 │ export const Foo = forwardRef((props: FooProps, ref: Ref): JSX.Element => {
+ > 2 │ return ;
+ │ ^
+ 3 │ });
+ 4 │
+
+issue-7542.ts:6:18 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+
+ × unterminated regex literal
+
+ 5 │ export const Bar = forwardRef((props: BarProps, ref: Ref): JSX.Element | null => {
+ > 6 │ return ;
+ │
+ 7 │ });
+ 8 │
+
+ i ...but the line ends here
+
+ 5 │ export const Bar = forwardRef((props: BarProps, ref: Ref): JSX.Element | null => {
+ > 6 │ return ;
+ │
+ 7 │ });
+ 8 │
+
+ i a regex literal starts there...
+
+ 5 │ export const Bar = forwardRef((props: BarProps, ref: Ref): JSX.Element | null => {
+ > 6 │ return ;
+ │ ^
+ 7 │ });
+ 8 │
+
+
+```
+
+