mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-28 02:45:51 -05:00
update tests formatting
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////const foo = /*a*/function/*b*/(a: number, b: number) {};
|
||||
////const foo = /*a*/function/*b*/(a: number, b: number) { };
|
||||
////foo(1, 2);
|
||||
|
||||
goTo.select("a", "b");
|
||||
@@ -8,6 +8,6 @@ edit.applyRefactor({
|
||||
refactorName: "Convert to named parameters",
|
||||
actionName: "Convert to named parameters",
|
||||
actionDescription: "Convert to named parameters",
|
||||
newContent: `const foo = function({ a, b }: { a: number; b: number; }) {};
|
||||
newContent: `const foo = function({ a, b }: { a: number; b: number; }) { };
|
||||
foo({ a: 1, b: 2 });`
|
||||
});
|
||||
@@ -1,6 +1,6 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////const foo = /*a*/(a: number, b: number)/*b*/ => {};
|
||||
////const foo = /*a*/(a: number, b: number)/*b*/ => { };
|
||||
////foo(1, 2);
|
||||
|
||||
goTo.select("a", "b");
|
||||
@@ -8,6 +8,6 @@ edit.applyRefactor({
|
||||
refactorName: "Convert to named parameters",
|
||||
actionName: "Convert to named parameters",
|
||||
actionDescription: "Convert to named parameters",
|
||||
newContent: `const foo = ({ a, b }: { a: number; b: number; }) => {};
|
||||
newContent: `const foo = ({ a, b }: { a: number; b: number; }) => { };
|
||||
foo({ a: 1, b: 2 });`
|
||||
});
|
||||
@@ -1,7 +1,7 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////const c = class {
|
||||
//// constructor(/*a*/a: number, b = { x: 1 }/*b*/) {}
|
||||
//// constructor(/*a*/a: number, b = { x: 1 }/*b*/) { }
|
||||
////}
|
||||
////var x = new c(2);
|
||||
|
||||
@@ -11,7 +11,7 @@ edit.applyRefactor({
|
||||
actionName: "Convert to named parameters",
|
||||
actionDescription: "Convert to named parameters",
|
||||
newContent: `const c = class {
|
||||
constructor({ a, b = { x: 1 } }: { a: number; b?: { x: number; }; }) {}
|
||||
constructor({ a, b = { x: 1 } }: { a: number; b?: { x: number; }; }) { }
|
||||
}
|
||||
var x = new c({ a: 2 });`
|
||||
});
|
||||
|
||||
@@ -11,7 +11,7 @@ edit.applyRefactor({
|
||||
actionName: "Convert to named parameters",
|
||||
actionDescription: "Convert to named parameters",
|
||||
newContent: `function foo<T, S>({ t, s }: { t: T; s: S; }) {
|
||||
return s;
|
||||
return s;
|
||||
}
|
||||
foo({ t: "a", s: "b" });`
|
||||
});
|
||||
@@ -7,6 +7,7 @@
|
||||
////}
|
||||
////var foo = new Foo();
|
||||
////foo['bar']("a", "b");
|
||||
////foo.bar("a", "b");
|
||||
|
||||
goTo.select("a", "b");
|
||||
edit.applyRefactor({
|
||||
@@ -19,5 +20,6 @@ edit.applyRefactor({
|
||||
}
|
||||
}
|
||||
var foo = new Foo();
|
||||
foo['bar']({ t: "a", s: "b" });`
|
||||
foo['bar']({ t: "a", s: "b" });
|
||||
foo.bar({ t: "a", s: "b" });`
|
||||
});
|
||||
Reference in New Issue
Block a user