= T extends (infer P)[] ? /*a*/P/*b*/ : never;
goTo.select("a", "b");
edit.applyRefactor({
@@ -9,5 +9,5 @@ edit.applyRefactor({
actionDescription: "Extract to type alias",
newContent: `type /*RENAME*/NewType = P;
-type Item = T extends (infer P)[] ? NewType : never`,
+type Item = T extends (infer P)[] ? NewType : never;`,
});
diff --git a/tests/cases/fourslash/refactorExtractType30.ts b/tests/cases/fourslash/refactorExtractType30.ts
index a0684cabb53..a3943d32128 100644
--- a/tests/cases/fourslash/refactorExtractType30.ts
+++ b/tests/cases/fourslash/refactorExtractType30.ts
@@ -1,6 +1,6 @@
///
-//// type Item = T extends (infer P)[] ? P : /*a*/never/*b*/
+//// type Item = T extends (infer P)[] ? P : /*a*/never/*b*/;
goTo.select("a", "b");
edit.applyRefactor({
@@ -9,5 +9,5 @@ edit.applyRefactor({
actionDescription: "Extract to type alias",
newContent: `type /*RENAME*/NewType = never;
-type Item = T extends (infer P)[] ? P : NewType`,
+type Item = T extends (infer P)[] ? P : NewType;`,
});
diff --git a/tests/cases/fourslash/refactorExtractType34.ts b/tests/cases/fourslash/refactorExtractType34.ts
index 114d08a09a6..45b4c116549 100644
--- a/tests/cases/fourslash/refactorExtractType34.ts
+++ b/tests/cases/fourslash/refactorExtractType34.ts
@@ -1,6 +1,6 @@
///
-//// type Item = /*a*/T extends (infer P)[] ? P : never/*b*/
+//// type Item = /*a*/T extends (infer P)[] ? P : never/*b*/;
goTo.select("a", "b");
edit.applyRefactor({
@@ -9,5 +9,5 @@ edit.applyRefactor({
actionDescription: "Extract to type alias",
newContent: `type /*RENAME*/NewType = T extends (infer P)[] ? P : never;
-type Item = NewType`,
+type Item = NewType;`,
});
diff --git a/tests/cases/fourslash/refactorExtractType35.ts b/tests/cases/fourslash/refactorExtractType35.ts
index 8ace9f929b8..979918e13e8 100644
--- a/tests/cases/fourslash/refactorExtractType35.ts
+++ b/tests/cases/fourslash/refactorExtractType35.ts
@@ -1,6 +1,6 @@
///
-//// type Union = /*a*/U | T/*b*/
+//// type Union = /*a*/U | T/*b*/;
goTo.select("a", "b");
edit.applyRefactor({
@@ -9,5 +9,5 @@ edit.applyRefactor({
actionDescription: "Extract to type alias",
newContent: `type /*RENAME*/NewType = U | T;
-type Union = NewType`,
+type Union = NewType;`,
});
diff --git a/tests/cases/fourslash/refactorExtractType36.ts b/tests/cases/fourslash/refactorExtractType36.ts
index 5086bf130ce..e36983e7440 100644
--- a/tests/cases/fourslash/refactorExtractType36.ts
+++ b/tests/cases/fourslash/refactorExtractType36.ts
@@ -1,6 +1,6 @@
///
-//// type A = (v: /*a*/string | number/*b*/) => v is string
+//// type A = (v: /*a*/string | number/*b*/) => v is string;
goTo.select("a", "b");
edit.applyRefactor({
@@ -9,6 +9,6 @@ edit.applyRefactor({
actionDescription: "Extract to type alias",
newContent: `type /*RENAME*/NewType = string | number;
-type A = (v: NewType) => v is string`,
+type A = (v: NewType) => v is string;`,
});
diff --git a/tests/cases/fourslash/refactorExtractType37.ts b/tests/cases/fourslash/refactorExtractType37.ts
index b24e219b3e4..d3c9514e4d2 100644
--- a/tests/cases/fourslash/refactorExtractType37.ts
+++ b/tests/cases/fourslash/refactorExtractType37.ts
@@ -1,6 +1,6 @@
///
-//// type A = (v: string | number) => v is /*a*/string/*b*/
+//// type A = (v: string | number) => v is /*a*/string/*b*/;
goTo.select("a", "b");
edit.applyRefactor({
@@ -9,5 +9,5 @@ edit.applyRefactor({
actionDescription: "Extract to type alias",
newContent: `type /*RENAME*/NewType = string;
-type A = (v: string | number) => v is NewType`,
+type A = (v: string | number) => v is NewType;`,
});
diff --git a/tests/cases/fourslash/refactorExtractType39.ts b/tests/cases/fourslash/refactorExtractType39.ts
index 1f55dcee39a..d5a96889304 100644
--- a/tests/cases/fourslash/refactorExtractType39.ts
+++ b/tests/cases/fourslash/refactorExtractType39.ts
@@ -1,6 +1,6 @@
///
-//// type A = /*a*/(v: string | number) => v is string/*b*/
+//// type A = /*a*/(v: string | number) => v is string/*b*/;
goTo.select("a", "b");
edit.applyRefactor({
@@ -9,5 +9,5 @@ edit.applyRefactor({
actionDescription: "Extract to type alias",
newContent: `type /*RENAME*/NewType = (v: string | number) => v is string;
-type A = NewType`,
+type A = NewType;`,
});
diff --git a/tests/cases/fourslash/refactorExtractType42.ts b/tests/cases/fourslash/refactorExtractType42.ts
index 29692ab06e6..67b6dc51875 100644
--- a/tests/cases/fourslash/refactorExtractType42.ts
+++ b/tests/cases/fourslash/refactorExtractType42.ts
@@ -1,15 +1,15 @@
///
-//// const a = 1
-//// type A = (v: string | number) => /*a*/typeof a/*b*/
+//// const a = 1;
+//// type A = (v: string | number) => /*a*/typeof a/*b*/;
goTo.select("a", "b");
edit.applyRefactor({
refactorName: "Extract type",
actionName: "Extract to type alias",
actionDescription: "Extract to type alias",
- newContent: `const a = 1
+ newContent: `const a = 1;
type /*RENAME*/NewType = typeof a;
-type A = (v: string | number) => NewType`,
+type A = (v: string | number) => NewType;`,
});
diff --git a/tests/cases/fourslash/refactorExtractType44.ts b/tests/cases/fourslash/refactorExtractType44.ts
index 22e1a9172dc..e570c9d60e9 100644
--- a/tests/cases/fourslash/refactorExtractType44.ts
+++ b/tests/cases/fourslash/refactorExtractType44.ts
@@ -1,6 +1,6 @@
///
-//// type A = /*a*/B.C.D/*b*/
+//// type A = /*a*/B.C.D/*b*/;
goTo.select("a", "b");
edit.applyRefactor({
@@ -9,5 +9,5 @@ edit.applyRefactor({
actionDescription: "Extract to type alias",
newContent: `type /*RENAME*/NewType = B.C.D;
-type A = NewType`,
+type A = NewType;`,
});
diff --git a/tests/cases/fourslash/refactorExtractType45.ts b/tests/cases/fourslash/refactorExtractType45.ts
index 60d9d77bc29..bfc3288e587 100644
--- a/tests/cases/fourslash/refactorExtractType45.ts
+++ b/tests/cases/fourslash/refactorExtractType45.ts
@@ -1,6 +1,6 @@
///
-//// type A = /*a*/B.C.D/*b*/
+//// type A = /*a*/B.C.D/*b*/;
goTo.select("a", "b");
edit.applyRefactor({
@@ -9,5 +9,5 @@ edit.applyRefactor({
actionDescription: "Extract to type alias",
newContent: `type /*RENAME*/NewType = B.C.D;
-type A = NewType`,
+type A = NewType;`,
});
diff --git a/tests/cases/fourslash/refactorExtractType46.ts b/tests/cases/fourslash/refactorExtractType46.ts
index ddcfa4878c9..0f244f0ec02 100644
--- a/tests/cases/fourslash/refactorExtractType46.ts
+++ b/tests/cases/fourslash/refactorExtractType46.ts
@@ -1,15 +1,15 @@
///
-//// namespace A { export const b = 1 }
-//// function a(b: string): /*a*/typeof A.b/*b*/ { return 1 }
+//// namespace A { export const b = 1; }
+//// function a(b: string): /*a*/typeof A.b/*b*/ { return 1; }
goTo.select("a", "b");
edit.applyRefactor({
refactorName: "Extract type",
actionName: "Extract to type alias",
actionDescription: "Extract to type alias",
- newContent: `namespace A { export const b = 1 }
+ newContent: `namespace A { export const b = 1; }
type /*RENAME*/NewType = typeof A.b;
-function a(b: string): NewType { return 1 }`,
+function a(b: string): NewType { return 1; }`,
});
diff --git a/tests/cases/fourslash/refactorExtractType49.ts b/tests/cases/fourslash/refactorExtractType49.ts
index 7d965ee3d09..96429a91881 100644
--- a/tests/cases/fourslash/refactorExtractType49.ts
+++ b/tests/cases/fourslash/refactorExtractType49.ts
@@ -1,15 +1,15 @@
///
-//// type A = T
-//// type B = /*a*/A/*b*/
+//// type A = T;
+//// type B = /*a*/A/*b*/;
goTo.select("a", "b");
edit.applyRefactor({
refactorName: "Extract type",
actionName: "Extract to type alias",
actionDescription: "Extract to type alias",
- newContent: `type A = T
+ newContent: `type A = T;
type /*RENAME*/NewType = A;
-type B = NewType`,
+type B = NewType;`,
});
diff --git a/tests/cases/fourslash/refactorExtractType7.ts b/tests/cases/fourslash/refactorExtractType7.ts
index a5b1f4c7dd0..d1a40f83579 100644
--- a/tests/cases/fourslash/refactorExtractType7.ts
+++ b/tests/cases/fourslash/refactorExtractType7.ts
@@ -1,7 +1,7 @@
///
//// function foo(a: /*a*/number/*b*/, b?: number, ...c: number[]): boolean {
-//// return false as boolean
+//// return false as boolean;
//// }
goTo.select("a", "b");
@@ -12,6 +12,6 @@ edit.applyRefactor({
newContent: `type /*RENAME*/NewType = number;
function foo(a: NewType, b?: number, ...c: number[]): boolean {
- return false as boolean
+ return false as boolean;
}`,
});
diff --git a/tests/cases/fourslash/refactorExtractType8.ts b/tests/cases/fourslash/refactorExtractType8.ts
index 61121c67374..c13e68e10f5 100644
--- a/tests/cases/fourslash/refactorExtractType8.ts
+++ b/tests/cases/fourslash/refactorExtractType8.ts
@@ -1,7 +1,7 @@
///
//// function foo(a: number, b?: /*a*/number/*b*/, ...c: number[]): boolean {
-//// return false as boolean
+//// return false as boolean;
//// }
goTo.select("a", "b");
@@ -12,6 +12,6 @@ edit.applyRefactor({
newContent: `type /*RENAME*/NewType = number;
function foo(a: number, b?: NewType, ...c: number[]): boolean {
- return false as boolean
+ return false as boolean;
}`,
});
diff --git a/tests/cases/fourslash/refactorExtractType9.ts b/tests/cases/fourslash/refactorExtractType9.ts
index 921f2a005a5..49a5f737ee9 100644
--- a/tests/cases/fourslash/refactorExtractType9.ts
+++ b/tests/cases/fourslash/refactorExtractType9.ts
@@ -1,7 +1,7 @@
///
//// function foo(a: number, b?: number, ...c: /*a*/number[]/*b*/): boolean {
-//// return false as boolean
+//// return false as boolean;
//// }
goTo.select("a", "b");
@@ -12,6 +12,6 @@ edit.applyRefactor({
newContent: `type /*RENAME*/NewType = number[];
function foo(a: number, b?: number, ...c: NewType): boolean {
- return false as boolean
+ return false as boolean;
}`,
});