Skip to content

Commit

Permalink
add more case
Browse files Browse the repository at this point in the history
  • Loading branch information
Kingwl committed May 8, 2019
1 parent 98d7eba commit 537e806
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 4 deletions.
8 changes: 7 additions & 1 deletion tests/cases/fourslash/codeFixSurmiseReturnValue_all1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@
//// const baz5: ((() => number) | (() => A)) = () => {
//// bar: '1'
//// }
////
//// const test: { a: () => A } = { a: () => { bar: '1' } }

verify.codeFixAll({
fixId: "fixAddReturnStatement",
Expand Down Expand Up @@ -111,5 +113,9 @@ const baz4: ((() => number) | (() => A)) = () => {
}
const baz5: ((() => number) | (() => A)) = () => {
return { bar: '1' };
}`,
}
const test: { a: () => A } = { a: () => {
return { bar: '1' };
} }`,
});
6 changes: 5 additions & 1 deletion tests/cases/fourslash/codeFixSurmiseReturnValue_all2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@
//// const baz5: ((() => number) | (() => A)) = () => {
//// bar: '1'
//// }
////
//// const test: { a: () => A } = { a: () => { bar: '1' } }

verify.codeFixAll({
fixId: "fixRemoveBlockBodyBrace",
Expand Down Expand Up @@ -91,5 +93,7 @@ const baz1: () => number = () => 1
const baz2: () => A = () => ({ bar: '1' })
const baz3: () => A = () => ({ bar: '1' })
const baz4: ((() => number) | (() => A)) = () => 1
const baz5: ((() => number) | (() => A)) = () => ({ bar: '1' })`,
const baz5: ((() => number) | (() => A)) = () => ({ bar: '1' })
const test: { a: () => A } = { a: () => ({ bar: '1' }) }`,
});
6 changes: 5 additions & 1 deletion tests/cases/fourslash/codeFixSurmiseReturnValue_all3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@
//// const baz5: ((() => number) | (() => A)) = () => {
//// bar: '1'
//// }
////
//// const test: { a: () => A } = { a: () => { bar: '1' } }

verify.codeFixAll({
fixId: "fixReplaceBraceWithParen",
Expand Down Expand Up @@ -91,5 +93,7 @@ const baz1: () => number = () => (1)
const baz2: () => A = () => ({ bar: '1' })
const baz3: () => A = () => ({ bar: '1' })
const baz4: ((() => number) | (() => A)) = () => (1)
const baz5: ((() => number) | (() => A)) = () => ({ bar: '1' })`,
const baz5: ((() => number) | (() => A)) = () => ({ bar: '1' })
const test: { a: () => A } = { a: () => ({ bar: '1' }) }`,
});
6 changes: 5 additions & 1 deletion tests/cases/fourslash/codeFixSurmiseReturnValue_all4.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@
//// const baz5: ((() => number) | (() => A)) = () => {
//// bar: '1'
//// }
////
//// const test: { a: () => A } = { a: () => { bar: '1' } }

verify.codeFixAll({
fixId: "fixWrapTheBlockWithParen",
Expand Down Expand Up @@ -91,5 +93,7 @@ const baz1: () => number = () => (1)
const baz2: () => A = () => ({ bar: '1' })
const baz3: () => A = () => ({ bar: '1' })
const baz4: ((() => number) | (() => A)) = () => (1)
const baz5: ((() => number) | (() => A)) = () => ({ bar: '1' })`,
const baz5: ((() => number) | (() => A)) = () => ({ bar: '1' })
const test: { a: () => A } = { a: () => ({ bar: '1' }) }`,
});

0 comments on commit 537e806

Please sign in to comment.