/third_party/typescript/tests/cases/fourslash/ |
H A D | refactorConvertParamsToDestructuredObject_functionTypeParameters.ts | 3 ////function foo<T, S>(/*a*/t: T, s: S/*b*/) {
6 ////foo("a", "b");
13 newContent: `function foo<T, S>({ t, s }: { t: T; s: S; }) {
16 foo({ t: "a", s: "b" });`
|
H A D | refactorConvertParamsToDestructuredObject_importedFunction3.ts | 4 ////function foo(/*a*/a: string, b: string/*b*/) { }
5 ////export = foo;
17 newContent: `function foo({ a, b }: { a: string; b: string; }) { }
18 export = foo;`
|
H A D | refactorConvertParamsToDestructuredObject_importedFunction4.ts | 4 ////export { foo as default };
5 ////function /*a*/foo/*b*/(a: number, b: number) {
19 newContent: `export { foo as default };
20 function foo({ a, b }: { a: number; b: number; }) {
|
H A D | refactorConvertParamsToDestructuredObject_importedFunction6.ts | 4 ////export function /*a*/foo/*b*/(a: string, b: string) { }
8 ////f.foo("a", "b");
16 newContent: `export function foo({ a, b }: { a: string; b: string; }) { }`
21 f.foo({ a: "a", b: "b" });`
|
H A D | refactorConvertParamsToDestructuredObject_inheritedConstructor.ts | 3 ////class Foo {
6 ////class Bar extends Foo { }
8 ////var foo = new Foo("c", "d");
15 newContent: `class Foo {
18 class Bar extends Foo { }
20 var foo = new Foo({ t: "c", s: "d" });`
|
H A D | refactorConvertParamsToDestructuredObject_inheritedMethod.ts | 3 ////class Foo {
8 ////class Bar extends Foo { }
17 newContent: `class Foo {
22 class Bar extends Foo { }
|
H A D | refactorConvertParamsToDestructuredObject_method.ts | 3 ////class Foo {
8 ////var foo = new Foo();
9 ////foo.bar("a", "b");
16 newContent: `class Foo {
21 var foo = new Foo();
22 foo.bar({ t: "a", s: "b" });`
|
H A D | refactorConvertParamsToDestructuredObject_methodCallUnion.ts | 4 //// /*a*/foo/*b*/(a: number, b: number) { return a + b; }
7 //// foo(c: number, d: number) { return c + d; }
10 ////ab.foo(1, 2);
20 foo(a: number, b: number) { return a + b; }
23 foo(c: number, d: number) { return c + d; }
26 ab.foo(1, 2);`
|
H A D | refactorConvertParamsToDestructuredObject_methodCalls.ts | 3 ////class Foo {
8 ////var foo = new Foo();
9 ////foo['bar']("a", "b");
10 ////foo.bar("a", "b");
17 newContent: `class Foo {
22 var foo = new Foo();
23 foo['bar']({ t: "a", s: "b" });
24 foo [all...] |
H A D | refactorConvertParamsToDestructuredObject_methodOverrides.ts | 4 //// /*a*/foo/*b*/(a: number, b: number) { }
7 //// /*c*/foo/*d*/(c: number, d: number) { }
10 ////a.foo(3, 4);
12 ////b.foo(5, 6);
20 foo(a: number, b: number) { }
23 foo(c: number, d: number) { }
26 a.foo(3, 4);
28 b.foo(5, 6);`
36 foo(a: number, b: number) { }
39 foo( [all...] |
H A D | refactorConvertParamsToDestructuredObject_recursiveFunction.ts | 3 ////const f = function foo(/*a*/a: number, b: number/*b*/) {
4 //// foo(1, 2);
6 ////function foo(a: number, b: number) { }
7 ////foo(3, 4);
15 newContent: `const f = function foo({ a, b }: { a: number; b: number; }) {
16 foo({ a: 1, b: 2 });
18 function foo(a: number, b: number) { }
19 foo(3, 4);`
|
H A D | refactorConvertParamsToDestructuredObject_staticMethod.ts | 3 ////class Foo {
8 ////Foo.bar("a", "b");
15 newContent: `class Foo {
20 Foo.bar({ t: "a", s: "b" });`
|
H A D | refactorConvertParamsToDestructuredObject_thisParam.ts | 3 ////function foo(this: void, /*a*/t: string, s: string/*b*/) {
6 ////foo("a", "b");
13 newContent: `function foo(this: void, { t, s }: { t: string; s: string; }) {
16 foo({ t: "a", s: "b" });`
|
H A D | refactorConvertParamsToDestructuredObject_typeLiteral.ts | 3 ////type Foo = {
6 ////const x: Foo = {
15 newContent: `type Foo = {
18 const x: Foo = {
|
H A D | refactorConvertParamsToDestructuredObject_varArrowFunction.ts | 3 ////var foo = /*a*/(a: number, b: number)/*b*/ => {};
4 ////foo(1, 2);
|
H A D | refactorConvertStringOrTemplateLiteral_OnModuleSpecifier.ts | 3 ////import { x } from /*x*/"foo"/*y*/;
|
H A D | refactorConvertStringOrTemplateLiteral_TemplateString1.ts | 3 ////const foo = /*start*/"" + ``/*end*/;
10 newContent: "const foo = ``;",
|
H A D | refactorConvertStringOrTemplateLiteral_TemplateString13.ts | 3 ////fetch(/*start*/process.env.API_URL + `/foo/bar?id=${id}&token=${token}`/*end*/); 10 newContent: "fetch(`${process.env.API_URL}/foo/bar?id=${id}&token=${token}`);",
|
H A D | refactorConvertStringOrTemplateLiteral_TemplateString2.ts | 3 ////const foo = 1;
4 ////const bar = /*start*/"a" + `${foo}`/*end*/;
12 "const foo = 1;",
13 "const bar = `a${foo}`;"
|
H A D | refactorConvertStringOrTemplateLiteral_TemplateString3.ts | 3 ////const foo = /*start*/`` + ""/*end*/;
10 newContent: "const foo = ``;"
|
H A D | refactorConvertStringOrTemplateLiteral_TemplateString4.ts | 3 ////const foo = 1;
4 ////const bar = /*start*/`` + "1" + `` + `${foo}`/*end*/;
12 "const foo = 1;",
13 "const bar = `1${foo}`;"
|
H A D | refactorConvertStringOrTemplateLiteral_TemplateString5.ts | 3 ////const foo = 1;
4 ////const bar = /*start*/`1` + "2" + `3` + `${foo}`/*end*/;
12 "const foo = 1;",
13 "const bar = `123${foo}`;"
|
H A D | refactorConvertStringOrTemplateLiteral_TemplateString6.ts | 3 ////const foo = 1;
4 ////const bar = /*start*/"a" + `${foo}` + "b"/*end*/;
12 "const foo = 1;",
13 "const bar = `a${foo}b`;"
|
H A D | refactorConvertStringOrTemplateLiteral_TemplateString7.ts | 3 ////const foo = 1;
4 ////const bar = /*start*/"a " + `${foo}` + " b " + " c"/*end*/;
12 "const foo = 1;",
13 "const bar = `a ${foo} b c`;"
|
H A D | refactorConvertStringOrTemplateLiteral_ToTemplateAsFnArgument.ts | 11 `console.log(\`foobar is \${32} years old\`)`,
|