mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-25 22:01:51 -05:00
add test for non-transient symbol
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////class A {
|
||||
//// /*a*/foo/*b*/(a: number, b: number) { return a + b; }
|
||||
////}
|
||||
////class B {
|
||||
//// foo(c: number, d: number) { return c + d; }
|
||||
////}
|
||||
////function foo(ab: A | B) {
|
||||
//// return ab.foo(1, 2);
|
||||
////}
|
||||
|
||||
|
||||
goTo.select("a", "b");
|
||||
// Refactor should not make changes
|
||||
edit.applyRefactor({
|
||||
refactorName: "Convert to named parameters",
|
||||
actionName: "Convert to named parameters",
|
||||
actionDescription: "Convert to named parameters",
|
||||
newContent: `class A {
|
||||
foo(a: number, b: number) { return a + b; }
|
||||
}
|
||||
class B {
|
||||
foo(c: number, d: number) { return c + d; }
|
||||
}
|
||||
function foo(ab: A | B) {
|
||||
return ab.foo(1, 2);
|
||||
}`
|
||||
});
|
||||
Reference in New Issue
Block a user