Skip to content

Commit 537e806

Browse files
committed
add more case
1 parent 98d7eba commit 537e806

4 files changed

+22
-4
lines changed

tests/cases/fourslash/codeFixSurmiseReturnValue_all1.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@
5454
//// const baz5: ((() => number) | (() => A)) = () => {
5555
//// bar: '1'
5656
//// }
57+
////
58+
//// const test: { a: () => A } = { a: () => { bar: '1' } }
5759

5860
verify.codeFixAll({
5961
fixId: "fixAddReturnStatement",
@@ -111,5 +113,9 @@ const baz4: ((() => number) | (() => A)) = () => {
111113
}
112114
const baz5: ((() => number) | (() => A)) = () => {
113115
return { bar: '1' };
114-
}`,
116+
}
117+
118+
const test: { a: () => A } = { a: () => {
119+
return { bar: '1' };
120+
} }`,
115121
});

tests/cases/fourslash/codeFixSurmiseReturnValue_all2.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@
5454
//// const baz5: ((() => number) | (() => A)) = () => {
5555
//// bar: '1'
5656
//// }
57+
////
58+
//// const test: { a: () => A } = { a: () => { bar: '1' } }
5759

5860
verify.codeFixAll({
5961
fixId: "fixRemoveBlockBodyBrace",
@@ -91,5 +93,7 @@ const baz1: () => number = () => 1
9193
const baz2: () => A = () => ({ bar: '1' })
9294
const baz3: () => A = () => ({ bar: '1' })
9395
const baz4: ((() => number) | (() => A)) = () => 1
94-
const baz5: ((() => number) | (() => A)) = () => ({ bar: '1' })`,
96+
const baz5: ((() => number) | (() => A)) = () => ({ bar: '1' })
97+
98+
const test: { a: () => A } = { a: () => ({ bar: '1' }) }`,
9599
});

tests/cases/fourslash/codeFixSurmiseReturnValue_all3.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@
5454
//// const baz5: ((() => number) | (() => A)) = () => {
5555
//// bar: '1'
5656
//// }
57+
////
58+
//// const test: { a: () => A } = { a: () => { bar: '1' } }
5759

5860
verify.codeFixAll({
5961
fixId: "fixReplaceBraceWithParen",
@@ -91,5 +93,7 @@ const baz1: () => number = () => (1)
9193
const baz2: () => A = () => ({ bar: '1' })
9294
const baz3: () => A = () => ({ bar: '1' })
9395
const baz4: ((() => number) | (() => A)) = () => (1)
94-
const baz5: ((() => number) | (() => A)) = () => ({ bar: '1' })`,
96+
const baz5: ((() => number) | (() => A)) = () => ({ bar: '1' })
97+
98+
const test: { a: () => A } = { a: () => ({ bar: '1' }) }`,
9599
});

tests/cases/fourslash/codeFixSurmiseReturnValue_all4.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@
5454
//// const baz5: ((() => number) | (() => A)) = () => {
5555
//// bar: '1'
5656
//// }
57+
////
58+
//// const test: { a: () => A } = { a: () => { bar: '1' } }
5759

5860
verify.codeFixAll({
5961
fixId: "fixWrapTheBlockWithParen",
@@ -91,5 +93,7 @@ const baz1: () => number = () => (1)
9193
const baz2: () => A = () => ({ bar: '1' })
9294
const baz3: () => A = () => ({ bar: '1' })
9395
const baz4: ((() => number) | (() => A)) = () => (1)
94-
const baz5: ((() => number) | (() => A)) = () => ({ bar: '1' })`,
96+
const baz5: ((() => number) | (() => A)) = () => ({ bar: '1' })
97+
98+
const test: { a: () => A } = { a: () => ({ bar: '1' }) }`,
9599
});

0 commit comments

Comments
 (0)