Skip to content

Commit 8c4ab69

Browse files
author
Gabriela Araujo Britto
committed
add test for non-transient symbol
1 parent 98a146d commit 8c4ab69

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/// <reference path='fourslash.ts' />
2+
3+
////class A {
4+
//// /*a*/foo/*b*/(a: number, b: number) { return a + b; }
5+
////}
6+
////class B {
7+
//// foo(c: number, d: number) { return c + d; }
8+
////}
9+
////function foo(ab: A | B) {
10+
//// return ab.foo(1, 2);
11+
////}
12+
13+
14+
goTo.select("a", "b");
15+
// Refactor should not make changes
16+
edit.applyRefactor({
17+
refactorName: "Convert to named parameters",
18+
actionName: "Convert to named parameters",
19+
actionDescription: "Convert to named parameters",
20+
newContent: `class A {
21+
foo(a: number, b: number) { return a + b; }
22+
}
23+
class B {
24+
foo(c: number, d: number) { return c + d; }
25+
}
26+
function foo(ab: A | B) {
27+
return ab.foo(1, 2);
28+
}`
29+
});

0 commit comments

Comments
 (0)