= 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 a0684cabb5300..a3943d3212818 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 114d08a09a6cf..45b4c116549e0 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 8ace9f929b8b9..979918e13e821 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 5086bf130cecc..e36983e7440a1 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 b24e219b3e4e3..d3c9514e4d2e9 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 1f55dcee39aaf..d5a9688930421 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 29692ab06e6a3..67b6dc51875e4 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 22e1a9172dc82..e570c9d60e9bc 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 60d9d77bc29eb..bfc3288e58713 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 ddcfa4878c9c1..0f244f0ec023e 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 7d965ee3d09e8..96429a91881e6 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 a5b1f4c7dd049..d1a40f8357997 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 61121c6737457..c13e68e10f511 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 921f2a005a507..49a5f737ee94c 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;
}`,
});