-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
179 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
tests/cases/fourslash/refactorAddOrRemoveBracesToArrowFunction10.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/// <reference path='fourslash.ts' /> | ||
|
||
//// const foo = /*a*/a/*b*/ => { return (1, 2, 3); }; | ||
|
||
goTo.select("a", "b"); | ||
edit.applyRefactor({ | ||
refactorName: "Add or remove braces in an arrow function", | ||
actionName: "Remove braces from arrow function", | ||
actionDescription: "Remove braces from arrow function", | ||
newContent: `const foo = a => (1, 2, 3);`, | ||
}); |
11 changes: 11 additions & 0 deletions
11
tests/cases/fourslash/refactorAddOrRemoveBracesToArrowFunction11.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/// <reference path='fourslash.ts' /> | ||
|
||
//// const foo = /*a*/a/*b*/ => { return 1, 2, 3; }; | ||
|
||
goTo.select("a", "b"); | ||
edit.applyRefactor({ | ||
refactorName: "Add or remove braces in an arrow function", | ||
actionName: "Remove braces from arrow function", | ||
actionDescription: "Remove braces from arrow function", | ||
newContent: `const foo = a => (1, 2, 3);`, | ||
}); |
11 changes: 11 additions & 0 deletions
11
tests/cases/fourslash/refactorAddOrRemoveBracesToArrowFunction12.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/// <reference path='fourslash.ts' /> | ||
|
||
//// const foo = /*a*/a/*b*/ => { return "foo"; }; | ||
|
||
goTo.select("a", "b"); | ||
edit.applyRefactor({ | ||
refactorName: "Add or remove braces in an arrow function", | ||
actionName: "Remove braces from arrow function", | ||
actionDescription: "Remove braces from arrow function", | ||
newContent: `const foo = a => "foo";`, | ||
}); |
11 changes: 11 additions & 0 deletions
11
tests/cases/fourslash/refactorAddOrRemoveBracesToArrowFunction13.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/// <reference path='fourslash.ts' /> | ||
|
||
//// const foo = /*a*/a/*b*/ => { return null; }; | ||
|
||
goTo.select("a", "b"); | ||
edit.applyRefactor({ | ||
refactorName: "Add or remove braces in an arrow function", | ||
actionName: "Remove braces from arrow function", | ||
actionDescription: "Remove braces from arrow function", | ||
newContent: `const foo = a => null;`, | ||
}); |
11 changes: 11 additions & 0 deletions
11
tests/cases/fourslash/refactorAddOrRemoveBracesToArrowFunction14.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/// <reference path='fourslash.ts' /> | ||
|
||
//// const foo = /*a*/a/*b*/ => { return undefined; }; | ||
|
||
goTo.select("a", "b"); | ||
edit.applyRefactor({ | ||
refactorName: "Add or remove braces in an arrow function", | ||
actionName: "Remove braces from arrow function", | ||
actionDescription: "Remove braces from arrow function", | ||
newContent: `const foo = a => undefined;`, | ||
}); |
11 changes: 11 additions & 0 deletions
11
tests/cases/fourslash/refactorAddOrRemoveBracesToArrowFunction15.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/// <reference path='fourslash.ts' /> | ||
|
||
//// const foo = /*a*/a/*b*/ => { return void 0; }; | ||
|
||
goTo.select("a", "b"); | ||
edit.applyRefactor({ | ||
refactorName: "Add or remove braces in an arrow function", | ||
actionName: "Remove braces from arrow function", | ||
actionDescription: "Remove braces from arrow function", | ||
newContent: `const foo = a => (void 0);`, | ||
}); |
11 changes: 11 additions & 0 deletions
11
tests/cases/fourslash/refactorAddOrRemoveBracesToArrowFunction16.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/// <reference path='fourslash.ts' /> | ||
|
||
//// const foo = /*a*/a/*b*/ => { return {}; }; | ||
|
||
goTo.select("a", "b"); | ||
edit.applyRefactor({ | ||
refactorName: "Add or remove braces in an arrow function", | ||
actionName: "Remove braces from arrow function", | ||
actionDescription: "Remove braces from arrow function", | ||
newContent: `const foo = a => ({});`, | ||
}); |
11 changes: 11 additions & 0 deletions
11
tests/cases/fourslash/refactorAddOrRemoveBracesToArrowFunction17.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/// <reference path='fourslash.ts' /> | ||
|
||
//// const foo = /*a*/a/*b*/ => { return `abc{a}`; }; | ||
|
||
goTo.select("a", "b"); | ||
edit.applyRefactor({ | ||
refactorName: "Add or remove braces in an arrow function", | ||
actionName: "Remove braces from arrow function", | ||
actionDescription: "Remove braces from arrow function", | ||
newContent: `const foo = a => \`abc{a}\`;`, | ||
}); |
11 changes: 11 additions & 0 deletions
11
tests/cases/fourslash/refactorAddOrRemoveBracesToArrowFunction18.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/// <reference path='fourslash.ts' /> | ||
|
||
//// const foo = /*a*/a/*b*/ => { return `abc`; }; | ||
|
||
goTo.select("a", "b"); | ||
edit.applyRefactor({ | ||
refactorName: "Add or remove braces in an arrow function", | ||
actionName: "Remove braces from arrow function", | ||
actionDescription: "Remove braces from arrow function", | ||
newContent: `const foo = a => \`abc\`;`, | ||
}); |
11 changes: 11 additions & 0 deletions
11
tests/cases/fourslash/refactorAddOrRemoveBracesToArrowFunction19.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/// <reference path='fourslash.ts' /> | ||
|
||
//// const foo = /*a*/a/*b*/ => { return a; }; | ||
|
||
goTo.select("a", "b"); | ||
edit.applyRefactor({ | ||
refactorName: "Add or remove braces in an arrow function", | ||
actionName: "Remove braces from arrow function", | ||
actionDescription: "Remove braces from arrow function", | ||
newContent: `const foo = a => a;`, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
tests/cases/fourslash/refactorAddOrRemoveBracesToArrowFunction9.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/// <reference path='fourslash.ts' /> | ||
|
||
//// const foo = /*a*/a/*b*/ => (1, 2, 3); | ||
|
||
goTo.select("a", "b"); | ||
edit.applyRefactor({ | ||
refactorName: "Add or remove braces in an arrow function", | ||
actionName: "Add braces to arrow function", | ||
actionDescription: "Add braces to arrow function", | ||
newContent: `const foo = a => { return (1, 2, 3); };`, | ||
}); |