2019-05-07 17:26:54 +02:00
|
|
|
/// <reference path='fourslash.ts' />
|
|
|
|
|
2019-06-06 19:28:42 +02:00
|
|
|
//// type A<T> = /*a*/B.C.D<T>/*b*/;
|
2019-05-07 17:26:54 +02:00
|
|
|
|
|
|
|
goTo.select("a", "b");
|
|
|
|
edit.applyRefactor({
|
|
|
|
refactorName: "Extract type",
|
|
|
|
actionName: "Extract to type alias",
|
|
|
|
actionDescription: "Extract to type alias",
|
|
|
|
newContent: `type /*RENAME*/NewType<T> = B.C.D<T>;
|
|
|
|
|
2019-06-06 19:28:42 +02:00
|
|
|
type A<T> = NewType<T>;`,
|
2019-05-07 17:26:54 +02:00
|
|
|
});
|