Fix missing parentheses around TSInstantiationExpression (#19442)

This commit is contained in:
fisker Cheung authored and GitHub committed 2026-06-24 16:57:23 +08:00
1 parent dae99edbe5
commit d1c3f659ee
6 files changed
+80

No files matched your search

@@ -0,0 +1,37 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
exports[`await.ts format 1`] = `
====================================options=====================================
parsers: ["typescript"]
printWidth: 80 (default) |
=====================================input======================================
async function* f() {
makeRecord = ( await makeRecordFactory)<ManualValue>
}
=====================================output=====================================
async function* f() {
makeRecord = (await makeRecordFactory)<ManualValue>;
}
================================================================================
`;
exports[`yield.ts format 1`] = `
====================================options=====================================
parsers: ["typescript"]
printWidth: 80 (default) |
=====================================input======================================
async function* f() {
makeRecord = ( yield* makeRecordFactory)<ManualValue>
makeRecord = ( yield makeRecordFactory)<ManualValue>
}
=====================================output=====================================
async function* f() {
makeRecord = (yield* makeRecordFactory)<ManualValue>;
makeRecord = (yield makeRecordFactory)<ManualValue>;
}
================================================================================
`;
@@ -0,0 +1,3 @@
async function* f() {
makeRecord = ( await makeRecordFactory)<ManualValue>
}
@@ -0,0 +1 @@
runFormatTest(import.meta, ["typescript"]);
@@ -0,0 +1,4 @@
async function* f() {
makeRecord = ( yield* makeRecordFactory)<ManualValue>
makeRecord = ( yield makeRecordFactory)<ManualValue>
}