Home
last modified time | relevance | path

Searched refs:currentLineContentIs (Results 1 – 25 of 168) sorted by relevance

1234567

/third_party/typescript/tests/cases/fourslash/
DformattingOnInvalidCodes.ts99 verify.currentLineContentIs("var a; var c, b; var $d");
101 verify.currentLineContentIs("var $e");
103 verify.currentLineContentIs("var f");
105 verify.currentLineContentIs("a++; b++;");
107 verify.currentLineContentIs("function f() {");
109 verify.currentLineContentIs(" for (i = 0; i < 10; i++) {");
111 verify.currentLineContentIs(" k = abc + 123 ^ d;");
113 verify.currentLineContentIs(" a = XYZ[m(a[b[c][d]])];");
115 verify.currentLineContentIs(" break;");
117 verify.currentLineContentIs(" switch (variable) {");
[all …]
DformattingFatArrowFunctions.ts118 verify.currentLineContentIs("() => 1;");
120 verify.currentLineContentIs("(arg) => 2;");
122 verify.currentLineContentIs("arg => 2;");
124 verify.currentLineContentIs("arg => 2;");
126 verify.currentLineContentIs("(arg = 1) => 3;");
128 verify.currentLineContentIs("(arg?) => 4;");
130 verify.currentLineContentIs("(arg: number) => 5;");
132 verify.currentLineContentIs("(arg: number = 0) => 6;");
134 verify.currentLineContentIs("(arg?: number) => 7;");
136 verify.currentLineContentIs("(...arg: number[]) => 8;");
[all …]
DformattingOnClasses.ts87 verify.currentLineContentIs("class a {");
89 verify.currentLineContentIs(" constructor(n: number);");
91 verify.currentLineContentIs(" constructor(s: string);");
93 verify.currentLineContentIs(" constructor(ns: any) {");
95 verify.currentLineContentIs(" }");
97 verify.currentLineContentIs(" public pgF() { }");
99 verify.currentLineContentIs(" public pv;");
101 verify.currentLineContentIs(" public get d() {");
103 verify.currentLineContentIs(" return 30;");
105 verify.currentLineContentIs(" }");
[all …]
DformattingOnStatementsWithNoSemicolon.ts62 verify.currentLineContentIs("do {");
64 verify.currentLineContentIs(" var a");
66 verify.currentLineContentIs("} while (1)");
68 verify.currentLineContentIs("function f() {");
70 verify.currentLineContentIs(" var s = 1");
72 verify.currentLineContentIs("}");
74 verify.currentLineContentIs("switch (t) {");
76 verify.currentLineContentIs(" case 1:");
78 verify.currentLineContentIs(" {");
80 verify.currentLineContentIs(" test");
[all …]
DformattingDecorators.ts50 verify.currentLineContentIs("@decorator1");
52 verify.currentLineContentIs("@decorator2");
54 verify.currentLineContentIs("@decorator3");
56 verify.currentLineContentIs("@decorator4 @decorator5");
58 verify.currentLineContentIs("class C {");
60 verify.currentLineContentIs(" @decorator6");
62 verify.currentLineContentIs(" @decorator7");
64 verify.currentLineContentIs(" @decorator8");
66 verify.currentLineContentIs(" method1() { }");
68 verify.currentLineContentIs(" @decorator9 @decorator10 @decorator11 method2() { }");
[all …]
DformattingJsxElements.ts94 verify.currentLineContentIs(' Hello, World!');
99 verify.currentLineContentIs(' Hello, World!');
104 verify.currentLineContentIs(' class1={');
106 verify.currentLineContentIs(' }>');
109 verify.currentLineContentIs(' Hello, World!');
114 verify.currentLineContentIs(' class2={');
116 verify.currentLineContentIs(' }>');
119 verify.currentLineContentIs(' Hello, World!');
124 verify.currentLineContentIs(' class3={');
126 verify.currentLineContentIs(' } />');
[all …]
DformattingOnObjectLiteral.ts33 verify.currentLineContentIs("var x = {");
35 verify.currentLineContentIs(" foo: 1,");
37 verify.currentLineContentIs(" bar: \"tt\",");
39 verify.currentLineContentIs(" boo: 1 + 5");
41 verify.currentLineContentIs("};");
43 verify.currentLineContentIs("var x2 = {");
45 verify.currentLineContentIs(" foo: 1,");
47 verify.currentLineContentIs(" bar: \"tt\", boo: 1 + 5");
49 verify.currentLineContentIs("};");
51 verify.currentLineContentIs("function Foo() {");
[all …]
DformattingOnClosingBracket.ts39 verify.currentLineContentIs("function f() {");
41 verify.currentLineContentIs(" var x = 3;");
43 verify.currentLineContentIs(" var z = 2;");
45 verify.currentLineContentIs(" a = z++ - 2 * x;");
47 verify.currentLineContentIs(" for (; ;) {");
49 verify.currentLineContentIs(" a += (g + g) * a % t;");
51 verify.currentLineContentIs(" b--;");
53 verify.currentLineContentIs(" }");
55 verify.currentLineContentIs(" switch (a) {");
57 verify.currentLineContentIs(" case 1: {");
[all …]
DformattingOnVariety.ts24 verify.currentLineContentIs("function f(a, b, c, d) {");
26 verify.currentLineContentIs(" for (var i = 0; i < 10; i++) {");
28 verify.currentLineContentIs(" var a = 0;");
30 verify.currentLineContentIs(" var b = a + a + a * a % a / 2 - 1;");
32 verify.currentLineContentIs(" b += a;");
34 verify.currentLineContentIs(" ++b;");
36 verify.currentLineContentIs(" f(a, b, c, d);");
38 verify.currentLineContentIs(" if (1 === 1) {");
40 verify.currentLineContentIs(" var m = function(e, f) {");
42 verify.currentLineContentIs(" return e ^ f;");
[all …]
DformatNamedExportImport.ts34 verify.currentLineContentIs('export { x, y as yy, z } from "foo"');
36 verify.currentLineContentIs('export { x, y as yy, z } from "bar"');
39 verify.currentLineContentIs("export {");
41 verify.currentLineContentIs(" x,");
43 verify.currentLineContentIs(" y as yy, z");
45 verify.currentLineContentIs("}");
47 verify.currentLineContentIs(" from");
51 verify.currentLineContentIs(' "foo"');
54 verify.currentLineContentIs('import { x, y as yy, z } from "baz"');
57 verify.currentLineContentIs("import {");
[all …]
DformattingOfMultilineBlockConstructs.ts42 verify.currentLineContentIs("module InternalModule {");
44 verify.currentLineContentIs("interface MyInterface {");
46 verify.currentLineContentIs("enum E {");
48 verify.currentLineContentIs("class MyClass {");
50 verify.currentLineContentIs(" constructor() { }");
52 verify.currentLineContentIs(" public MyFunction() {");
54 verify.currentLineContentIs(" public get Getter() {");
56 verify.currentLineContentIs(" public set Setter(x) {");
58 verify.currentLineContentIs("function foo() {");
60 verify.currentLineContentIs(" { }");
[all …]
DcommentsBlocks.ts31 verify.currentLineContentIs("// 1");
33 verify.currentLineContentIs(" // 2");
35 verify.currentLineContentIs(" /* %3 */");
37 verify.currentLineContentIs("// 4");
39 verify.currentLineContentIs(" // 5");
41 verify.currentLineContentIs(" // 6");
43 verify.currentLineContentIs(" // 7");
45 verify.currentLineContentIs(" // 8");
47 verify.currentLineContentIs("// 9");
49 verify.currentLineContentIs(" // 10");
[all …]
DformatVariableDeclarationList.ts18 verify.currentLineContentIs("var fun1 = function() {");
20 verify.currentLineContentIs(" var x = 'foo',");
22 verify.currentLineContentIs(" z = 'bar';");
24 verify.currentLineContentIs(" return x;");
26 verify.currentLineContentIs("},");
28 verify.currentLineContentIs(" fun2 = (function(f) {");
30 verify.currentLineContentIs(" var fun = function() {");
32 verify.currentLineContentIs(" console.log(f());");
34 verify.currentLineContentIs(" },");
36 verify.currentLineContentIs(" x = 'Foo';");
[all …]
DformattingofSingleLineBlockConstructs.ts18 verify.currentLineContentIs("module InternalModule { }");
20 verify.currentLineContentIs("interface MyInterface { }");
22 verify.currentLineContentIs("enum E { }");
24 verify.currentLineContentIs("class MyClass {");
26 verify.currentLineContentIs(" constructor() { }");
28 verify.currentLineContentIs(" public MyFunction() { return 0; }");
30 verify.currentLineContentIs(" public get Getter() { }");
32 verify.currentLineContentIs(" public set Setter(x) { }");
34 verify.currentLineContentIs("function foo() { { } }");
36 verify.currentLineContentIs("(function() { });");
[all …]
DformatMultilineComment.ts22 verify.currentLineContentIs("/** 1");
24 verify.currentLineContentIs(" *2");
26 verify.currentLineContentIs(" 3*/");
28 verify.currentLineContentIs(" /**4");
30 verify.currentLineContentIs(" *5");
32 verify.currentLineContentIs(" *6");
34 verify.currentLineContentIs(" 7*/");
36 verify.currentLineContentIs(" /**8");
38 verify.currentLineContentIs("*9");
40 verify.currentLineContentIs(" *10");
[all …]
DformattingSpaceBeforeCloseParen.ts12 verify.currentLineContentIs('( {} );');
14 verify.currentLineContentIs('( {} );');
16 verify.currentLineContentIs('( { foo: 42 } );');
18 verify.currentLineContentIs('( { foo: 42 } );');
20 verify.currentLineContentIs('var bar = ( function( a ) { } );');
25 verify.currentLineContentIs('({});');
27 verify.currentLineContentIs('({});');
29 verify.currentLineContentIs('({ foo: 42 });');
31 verify.currentLineContentIs('({ foo: 42 });');
33 verify.currentLineContentIs('var bar = (function(a) { });');
DgenericsFormatting.ts29 verify.currentLineContentIs("class Foo<T1, T2> {");
32 verify.currentLineContentIs(" public method<T3, T4>(a: T1, b: Array<T4>): Map<T1, T2, Array<T3>>…
35 verify.currentLineContentIs("var foo = new Foo<number, Array<number>>();");
37 verify.currentLineContentIs("foo = new Foo<{ bar: number }, Array<{ baz: string }>>();");
40 verify.currentLineContentIs(" new <T>(a: T);");
43 verify.currentLineContentIs(" op?<T, M>(a: T, b: M);");
46 verify.currentLineContentIs("function bar<T>() {");
49 verify.currentLineContentIs(" return class <T2> {");
52 verify.currentLineContentIs("class A<T> extends bar<T>()<T> {");
DformattingOnTabAfterCloseCurly.ts16 verify.currentLineContentIs("module Tools {");
18 verify.currentLineContentIs(" export enum NodeType {");
20 verify.currentLineContentIs(" Error,");
22 verify.currentLineContentIs(" Comment,");
24 verify.currentLineContentIs(" }");
26 verify.currentLineContentIs(" export enum foob {");
28 verify.currentLineContentIs(" Blah = 1, Bleah = 2");
30 verify.currentLineContentIs(" }");
32 verify.currentLineContentIs("}");
DformatArrayLiteralExpression.ts28 verify.currentLineContentIs(" Hat: 'hat',");
30 verify.currentLineContentIs("}, {");
32 verify.currentLineContentIs(" Salad: 'salad',");
34 verify.currentLineContentIs("}];");
37 verify.currentLineContentIs(" Hat: 'hat',");
39 verify.currentLineContentIs(" },");
41 verify.currentLineContentIs(" Salad: 'salad',");
43 verify.currentLineContentIs(" Burrito: ['burrito', 'carne asada', 'tinga de res', 'tinga de …
45 verify.currentLineContentIs(" }];");
DformattingTypeInfer.ts24 verify.currentLineContentIs("type C<T> = T extends Array<infer U> ? U : never;");
27 verify.currentLineContentIs("type C<T> = T extends Array<infer U> ? U : never;");
30 verify.currentLineContentIs("type C<T> = T extends Array<infer U> ? U : T;");
33 verify.currentLineContentIs("type C<T> = T extends Array<infer U> ? U : T;");
36 verify.currentLineContentIs("type Foo<T> = T extends { a: infer U, b: infer U } ? U : never;");
39 verify.currentLineContentIs("type Foo<T> = T extends { a: infer U, b: infer U } ? U : never;");
42 verify.currentLineContentIs("type Bar<T> = T extends { a: (x: infer U) => void, b: (x: infer U) => …
45 verify.currentLineContentIs("type Bar<T> = T extends { a: (x: infer U) => void, b: (x: infer U) => …
DformattingOnChainedCallbacksAndPropertyAccesses.ts23 verify.currentLineContentIs(' .toFixed');
25 verify.currentLineContentIs(' .toFixed()');
27 verify.currentLineContentIs(' .toFixed()');
29 verify.currentLineContentIs(' .length');
31 verify.currentLineContentIs(' .toString();');
33 verify.currentLineContentIs(' .toFixed');
35 verify.currentLineContentIs(' .toString()');
37 verify.currentLineContentIs(' .length;');
DformatWithStatement.ts16 verify.currentLineContentIs("with (foo.bar) {");
18 verify.currentLineContentIs("}");
20 verify.currentLineContentIs("with (bar.blah) {");
22 verify.currentLineContentIs("}");
27 verify.currentLineContentIs("with (foo.bar)");
29 verify.currentLineContentIs("{");
31 verify.currentLineContentIs("with (bar.blah)");
33 verify.currentLineContentIs("{");
DformattingNestedScopes.ts15 verify.currentLineContentIs("module My.App {");
17 verify.currentLineContentIs(" export var appModule = angular.module(\"app\", [");
19 verify.currentLineContentIs(" ]).config([() => {");
21 verify.currentLineContentIs(" configureStates");
23 verify.currentLineContentIs(" ($stateProvider);");
25 verify.currentLineContentIs(" }]).run(My.App.setup);");
27 verify.currentLineContentIs("}");
DformattingReplaceTabsWithSpaces.ts15 verify.currentLineContentIs(" class Test { }")
17 verify.currentLineContentIs(" class Test { }")
19 verify.currentLineContentIs(" class Test { }")
21 verify.currentLineContentIs(" class Test { }")
23 verify.currentLineContentIs(" class Test { }")
25 verify.currentLineContentIs(" class Test { }")
27 verify.currentLineContentIs(" class Test { }")
DformattingOnNestedDoWhileByEnter.ts11 verify.currentLineContentIs(" {");
13 verify.currentLineContentIs("do{");
15 verify.currentLineContentIs(" do");
17 verify.currentLineContentIs("do{");
19 verify.currentLineContentIs("}while(a!==b)");
21 verify.currentLineContentIs("}while(a!==b)");
23 verify.currentLineContentIs("}while(a!==b)");

1234567