mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-18 06:17:19 -05:00
add test for convert to named parameters refactoring
This commit is contained in:
15
tests/cases/fourslash/refactorConvertToNamedParameters.ts
Normal file
15
tests/cases/fourslash/refactorConvertToNamedParameters.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////function f(/*a*/a: number, b: string/*b*/): string {
|
||||
//// return b;
|
||||
////}
|
||||
|
||||
goTo.select("a", "b");
|
||||
edit.applyRefactor({
|
||||
refactorName: "Convert to named parameters",
|
||||
actionName: "Convert to named parameters",
|
||||
actionDescription: "Convert to named parameters",
|
||||
newContent: `function f({ a, b }: { a: number; b: string; }): string {
|
||||
return b;
|
||||
}`
|
||||
});
|
||||
Reference in New Issue
Block a user