From ca44ee8f975b32d275a7f6470f2232fc68cbc8a5 Mon Sep 17 00:00:00 2001 From: Andrew Branch Date: Thu, 6 Jun 2019 10:28:42 -0700 Subject: [PATCH] Update fourslash tests to have semicolons --- .../extract-method-in-anonymous-function-declaration.ts | 2 +- .../fourslash/extract-method_jsxIntrinsicTagSymbol.ts | 2 +- tests/cases/fourslash/refactorExtractType11.ts | 4 ++-- tests/cases/fourslash/refactorExtractType14.ts | 4 ++-- tests/cases/fourslash/refactorExtractType15.ts | 4 ++-- tests/cases/fourslash/refactorExtractType17.ts | 4 ++-- tests/cases/fourslash/refactorExtractType18.ts | 4 ++-- tests/cases/fourslash/refactorExtractType19.ts | 4 ++-- tests/cases/fourslash/refactorExtractType20.ts | 4 ++-- tests/cases/fourslash/refactorExtractType21.ts | 4 ++-- tests/cases/fourslash/refactorExtractType22.ts | 4 ++-- tests/cases/fourslash/refactorExtractType23.ts | 4 ++-- tests/cases/fourslash/refactorExtractType24.ts | 4 ++-- tests/cases/fourslash/refactorExtractType25.ts | 4 ++-- tests/cases/fourslash/refactorExtractType26.ts | 4 ++-- tests/cases/fourslash/refactorExtractType27.ts | 4 ++-- tests/cases/fourslash/refactorExtractType28.ts | 4 ++-- tests/cases/fourslash/refactorExtractType29.ts | 4 ++-- tests/cases/fourslash/refactorExtractType30.ts | 4 ++-- tests/cases/fourslash/refactorExtractType34.ts | 4 ++-- tests/cases/fourslash/refactorExtractType35.ts | 4 ++-- tests/cases/fourslash/refactorExtractType36.ts | 4 ++-- tests/cases/fourslash/refactorExtractType37.ts | 4 ++-- tests/cases/fourslash/refactorExtractType39.ts | 4 ++-- tests/cases/fourslash/refactorExtractType42.ts | 8 ++++---- tests/cases/fourslash/refactorExtractType44.ts | 4 ++-- tests/cases/fourslash/refactorExtractType45.ts | 4 ++-- tests/cases/fourslash/refactorExtractType46.ts | 8 ++++---- tests/cases/fourslash/refactorExtractType49.ts | 8 ++++---- tests/cases/fourslash/refactorExtractType7.ts | 4 ++-- tests/cases/fourslash/refactorExtractType8.ts | 4 ++-- tests/cases/fourslash/refactorExtractType9.ts | 4 ++-- 32 files changed, 68 insertions(+), 68 deletions(-) diff --git a/tests/cases/fourslash/extract-method-in-anonymous-function-declaration.ts b/tests/cases/fourslash/extract-method-in-anonymous-function-declaration.ts index 6566d129874..197ad698088 100644 --- a/tests/cases/fourslash/extract-method-in-anonymous-function-declaration.ts +++ b/tests/cases/fourslash/extract-method-in-anonymous-function-declaration.ts @@ -1,7 +1,7 @@ /// ////export default function() { -//// /*start*/0/*end*/ +//// /*start*/0/*end*/; ////} goTo.select('start', 'end') diff --git a/tests/cases/fourslash/extract-method_jsxIntrinsicTagSymbol.ts b/tests/cases/fourslash/extract-method_jsxIntrinsicTagSymbol.ts index 072fd670ddd..74a6b2fc212 100644 --- a/tests/cases/fourslash/extract-method_jsxIntrinsicTagSymbol.ts +++ b/tests/cases/fourslash/extract-method_jsxIntrinsicTagSymbol.ts @@ -11,5 +11,5 @@ edit.applyRefactor({ refactorName: "Extract Symbol", actionName: "constant_scope_0", actionDescription: "Extract to constant in enclosing scope", - newContent: "const /*RENAME*/newLocal =
;", + newContent: "const /*RENAME*/newLocal =
", }); diff --git a/tests/cases/fourslash/refactorExtractType11.ts b/tests/cases/fourslash/refactorExtractType11.ts index feb5e68c440..7f465bef111 100644 --- a/tests/cases/fourslash/refactorExtractType11.ts +++ b/tests/cases/fourslash/refactorExtractType11.ts @@ -1,7 +1,7 @@ /// //// function foo(a: number, b?: number, ...c: number[]): boolean { -//// return false as /*a*/boolean/*b*/ +//// return false as /*a*/boolean/*b*/; //// } goTo.select("a", "b"); @@ -12,6 +12,6 @@ edit.applyRefactor({ newContent: `function foo(a: number, b?: number, ...c: number[]): boolean { type /*RENAME*/NewType = boolean; - return false as NewType + return false as NewType; }`, }); diff --git a/tests/cases/fourslash/refactorExtractType14.ts b/tests/cases/fourslash/refactorExtractType14.ts index 4d5667bb540..29655086921 100644 --- a/tests/cases/fourslash/refactorExtractType14.ts +++ b/tests/cases/fourslash/refactorExtractType14.ts @@ -1,6 +1,6 @@ /// -//// type A = string | number | T +//// type A = string | number | T; goTo.select("a", "b"); edit.applyRefactor({ @@ -9,5 +9,5 @@ edit.applyRefactor({ actionDescription: "Extract to type alias", newContent: `type /*RENAME*/NewType = boolean; -type A = string | number | T`, +type A = string | number | T;`, }); diff --git a/tests/cases/fourslash/refactorExtractType15.ts b/tests/cases/fourslash/refactorExtractType15.ts index a716f42509a..84a26de6be4 100644 --- a/tests/cases/fourslash/refactorExtractType15.ts +++ b/tests/cases/fourslash/refactorExtractType15.ts @@ -1,6 +1,6 @@ /// -//// type A = /*a*/string/*b*/ | number | T +//// type A = /*a*/string/*b*/ | number | T; goTo.select("a", "b"); edit.applyRefactor({ @@ -9,5 +9,5 @@ edit.applyRefactor({ actionDescription: "Extract to type alias", newContent: `type /*RENAME*/NewType = string; -type A = NewType | number | T`, +type A = NewType | number | T;`, }); diff --git a/tests/cases/fourslash/refactorExtractType17.ts b/tests/cases/fourslash/refactorExtractType17.ts index ae62b402fe3..605fccb25d6 100644 --- a/tests/cases/fourslash/refactorExtractType17.ts +++ b/tests/cases/fourslash/refactorExtractType17.ts @@ -1,6 +1,6 @@ /// -//// type A = string | number | /*a*/T/*b*/ +//// type A = string | number | /*a*/T/*b*/; goTo.select("a", "b"); edit.applyRefactor({ @@ -9,5 +9,5 @@ edit.applyRefactor({ actionDescription: "Extract to type alias", newContent: `type /*RENAME*/NewType = T; -type A = string | number | NewType`, +type A = string | number | NewType;`, }); diff --git a/tests/cases/fourslash/refactorExtractType18.ts b/tests/cases/fourslash/refactorExtractType18.ts index 1ebe8a2b354..310be9b0e28 100644 --- a/tests/cases/fourslash/refactorExtractType18.ts +++ b/tests/cases/fourslash/refactorExtractType18.ts @@ -1,6 +1,6 @@ /// -//// type A = /*a*/Partial/*b*/ & D | C +//// type A = /*a*/Partial/*b*/ & D | C; goTo.select("a", "b"); edit.applyRefactor({ @@ -9,6 +9,6 @@ edit.applyRefactor({ actionDescription: "Extract to type alias", newContent: `type /*RENAME*/NewType = Partial; -type A = NewType & D | C`, +type A = NewType & D | C;`, }); diff --git a/tests/cases/fourslash/refactorExtractType19.ts b/tests/cases/fourslash/refactorExtractType19.ts index 4a982f6899d..4ecd563c7ea 100644 --- a/tests/cases/fourslash/refactorExtractType19.ts +++ b/tests/cases/fourslash/refactorExtractType19.ts @@ -1,6 +1,6 @@ /// -//// type A = /*a*/Partial/*b*/ & D | C +//// type A = /*a*/Partial/*b*/ & D | C; goTo.select("a", "b"); edit.applyRefactor({ @@ -9,6 +9,6 @@ edit.applyRefactor({ actionDescription: "Extract to type alias", newContent: `type /*RENAME*/NewType = Partial; -type A = NewType & D | C`, +type A = NewType & D | C;`, }); diff --git a/tests/cases/fourslash/refactorExtractType20.ts b/tests/cases/fourslash/refactorExtractType20.ts index b31f208704f..2994418355b 100644 --- a/tests/cases/fourslash/refactorExtractType20.ts +++ b/tests/cases/fourslash/refactorExtractType20.ts @@ -1,6 +1,6 @@ /// -//// type A = () => (v: /*a*/T/*b*/) => (v: T) => (v: T) => U +//// type A = () => (v: /*a*/T/*b*/) => (v: T) => (v: T) => U; goTo.select("a", "b"); edit.applyRefactor({ @@ -9,5 +9,5 @@ edit.applyRefactor({ actionDescription: "Extract to type alias", newContent: `type /*RENAME*/NewType = T; -type A = () => (v: NewType) => (v: T) => (v: T) => U`, +type A = () => (v: NewType) => (v: T) => (v: T) => U;`, }); diff --git a/tests/cases/fourslash/refactorExtractType21.ts b/tests/cases/fourslash/refactorExtractType21.ts index e97485c8269..157e38af75e 100644 --- a/tests/cases/fourslash/refactorExtractType21.ts +++ b/tests/cases/fourslash/refactorExtractType21.ts @@ -1,6 +1,6 @@ /// -//// type A = () => (v: T) => (v: /*a*/T/*b*/) => (v: T) => U +//// type A = () => (v: T) => (v: /*a*/T/*b*/) => (v: T) => U; goTo.select("a", "b"); edit.applyRefactor({ @@ -9,5 +9,5 @@ edit.applyRefactor({ actionDescription: "Extract to type alias", newContent: `type /*RENAME*/NewType = T; -type A = () => (v: T) => (v: NewType) => (v: T) => U`, +type A = () => (v: T) => (v: NewType) => (v: T) => U;`, }); diff --git a/tests/cases/fourslash/refactorExtractType22.ts b/tests/cases/fourslash/refactorExtractType22.ts index f7282df4ef7..16344397db6 100644 --- a/tests/cases/fourslash/refactorExtractType22.ts +++ b/tests/cases/fourslash/refactorExtractType22.ts @@ -1,6 +1,6 @@ /// -//// type A = () => (v: T) => (v: T) => (v: /*a*/T/*b*/) => U +//// type A = () => (v: T) => (v: T) => (v: /*a*/T/*b*/) => U; goTo.select("a", "b"); edit.applyRefactor({ @@ -9,5 +9,5 @@ edit.applyRefactor({ actionDescription: "Extract to type alias", newContent: `type /*RENAME*/NewType = T; -type A = () => (v: T) => (v: T) => (v: NewType) => U`, +type A = () => (v: T) => (v: T) => (v: NewType) => U;`, }); diff --git a/tests/cases/fourslash/refactorExtractType23.ts b/tests/cases/fourslash/refactorExtractType23.ts index 9e219dd3383..ea8082a3b2a 100644 --- a/tests/cases/fourslash/refactorExtractType23.ts +++ b/tests/cases/fourslash/refactorExtractType23.ts @@ -1,6 +1,6 @@ /// -//// type A = () => (v: T) => (v: T) => (v: T) => /*a*/U/*b*/ +//// type A = () => (v: T) => (v: T) => (v: T) => /*a*/U/*b*/; goTo.select("a", "b"); edit.applyRefactor({ @@ -9,5 +9,5 @@ edit.applyRefactor({ actionDescription: "Extract to type alias", newContent: `type /*RENAME*/NewType = U; -type A = () => (v: T) => (v: T) => (v: T) => NewType`, +type A = () => (v: T) => (v: T) => (v: T) => NewType;`, }); diff --git a/tests/cases/fourslash/refactorExtractType24.ts b/tests/cases/fourslash/refactorExtractType24.ts index 54b36acb252..98f3edecc67 100644 --- a/tests/cases/fourslash/refactorExtractType24.ts +++ b/tests/cases/fourslash/refactorExtractType24.ts @@ -1,6 +1,6 @@ /// -//// type A = () => (v: T) => (v: T) => /*a*/(v: T) => U/*b*/ +//// type A = () => (v: T) => (v: T) => /*a*/(v: T) => U/*b*/; goTo.select("a", "b"); edit.applyRefactor({ @@ -9,5 +9,5 @@ edit.applyRefactor({ actionDescription: "Extract to type alias", newContent: `type /*RENAME*/NewType = (v: T) => U; -type A = () => (v: T) => (v: T) => NewType`, +type A = () => (v: T) => (v: T) => NewType;`, }); diff --git a/tests/cases/fourslash/refactorExtractType25.ts b/tests/cases/fourslash/refactorExtractType25.ts index b09d04912c1..9ad43742111 100644 --- a/tests/cases/fourslash/refactorExtractType25.ts +++ b/tests/cases/fourslash/refactorExtractType25.ts @@ -1,6 +1,6 @@ /// -//// type A = () => (v: T) => /*a*/(v: T) => (v: T) => U/*b*/ +//// type A = () => (v: T) => /*a*/(v: T) => (v: T) => U/*b*/; goTo.select("a", "b"); edit.applyRefactor({ @@ -9,5 +9,5 @@ edit.applyRefactor({ actionDescription: "Extract to type alias", newContent: `type /*RENAME*/NewType = (v: T) => (v: T) => U; -type A = () => (v: T) => NewType`, +type A = () => (v: T) => NewType;`, }); diff --git a/tests/cases/fourslash/refactorExtractType26.ts b/tests/cases/fourslash/refactorExtractType26.ts index 662ce7eb8dc..2dffef7e9ac 100644 --- a/tests/cases/fourslash/refactorExtractType26.ts +++ b/tests/cases/fourslash/refactorExtractType26.ts @@ -1,6 +1,6 @@ /// -//// type A = () => /*a*/(v: T) => (v: T) => (v: T) => U/*b*/ +//// type A = () => /*a*/(v: T) => (v: T) => (v: T) => U/*b*/; goTo.select("a", "b"); edit.applyRefactor({ @@ -9,5 +9,5 @@ edit.applyRefactor({ actionDescription: "Extract to type alias", newContent: `type /*RENAME*/NewType = (v: T) => (v: T) => (v: T) => U; -type A = () => NewType`, +type A = () => NewType;`, }); diff --git a/tests/cases/fourslash/refactorExtractType27.ts b/tests/cases/fourslash/refactorExtractType27.ts index 5163fd2d480..e9c8d05601c 100644 --- a/tests/cases/fourslash/refactorExtractType27.ts +++ b/tests/cases/fourslash/refactorExtractType27.ts @@ -1,6 +1,6 @@ /// -//// type A = /*a*/() => (v: T) => (v: T) => (v: T) => U/*b*/ +//// type A = /*a*/() => (v: T) => (v: T) => (v: T) => U/*b*/; goTo.select("a", "b"); edit.applyRefactor({ @@ -9,5 +9,5 @@ edit.applyRefactor({ actionDescription: "Extract to type alias", newContent: `type /*RENAME*/NewType = () => (v: T) => (v: T) => (v: T) => U; -type A = NewType`, +type A = NewType;`, }); diff --git a/tests/cases/fourslash/refactorExtractType28.ts b/tests/cases/fourslash/refactorExtractType28.ts index 81d1356ca21..4e53e463a90 100644 --- a/tests/cases/fourslash/refactorExtractType28.ts +++ b/tests/cases/fourslash/refactorExtractType28.ts @@ -1,6 +1,6 @@ /// -//// type Item = /*a*/T/*b*/ extends (infer P)[] ? P : never +//// type Item = /*a*/T/*b*/ extends (infer P)[] ? P : never; goTo.select("a", "b"); edit.applyRefactor({ @@ -9,5 +9,5 @@ edit.applyRefactor({ actionDescription: "Extract to type alias", newContent: `type /*RENAME*/NewType = T; -type Item = NewType extends (infer P)[] ? P : never`, +type Item = NewType extends (infer P)[] ? P : never;`, }); diff --git a/tests/cases/fourslash/refactorExtractType29.ts b/tests/cases/fourslash/refactorExtractType29.ts index a1fb2ac405c..29fd2ec7e61 100644 --- a/tests/cases/fourslash/refactorExtractType29.ts +++ b/tests/cases/fourslash/refactorExtractType29.ts @@ -1,6 +1,6 @@ /// -//// type Item = T extends (infer P)[] ? /*a*/P/*b*/ : never +//// type Item = 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; }`, });