Skip to content

Commit 537e806

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

File tree

4 files changed

+22
-4
lines changed

4 files changed

+22
-4
lines changed

tests/cases/fourslash/codeFixSurmiseReturnValue_all1.ts

Lines changed: 7 additions & 1 deletion
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

Lines changed: 5 additions & 1 deletion
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

Lines changed: 5 additions & 1 deletion
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

Lines changed: 5 additions & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy