This repository has been archived by the owner on Mar 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 889
/
test.ts.fix
135 lines (97 loc) · 2.06 KB
/
test.ts.fix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
import ast = AST;
module M {
export var ast = AST;
var x: number;
var y = (x === 10) ? 1 : 2;
var zz = (y === 4);
var z = y;
var a, b;
switch (x) {
case 1: break;
default: break;
}
for (x = 1; x < 2; ++x) {
goto: console.log("hi");
}
for (x = 2; x--;) {}
for (;;) {}
while (i < 1) {
++i;
}
var q;
q.forEach(() => 3);
q.forEach(() => {
return 3;
});
var r: () => string;
var s: new () => string;
var a = <number> "10";
var a = <number> "10";
}
var a;
export = a;
a.then(() => {
return 1;
}).if(() => {
return 1;
});
var name = "something";
var test = `
<sl-property-group label=${name} Axes">
<div class="repeat"
`;
var withinTemplateExpression = `${name === "something" ? "foo" : "bar"}`;
var withinTemplateExpression = `${name === "something" ? "foo" : "bar"}`;
var objectInsideTemplateExpression = `${({foo: "bar"}).foo}`;
var objectInsideTemplateExpression = `${({foo: "bar"}).foo}`;
import { importA } from "libA";
import { importB } from "libB";
import { importC } from "libC";
import moduleD, { importD } from "libD";
import { importD, importE } from "libD";
import { importF as F } from "libF";
import { importF as F, importG as G } from "libF";
import {
importA,
importB
} from "libC";
export default 123;
const D = 123;
export { D as default }; // failure
export function each(obj, iterator, context) {
//
}
export { each as forEach };
import "libE";
const E = 123;
const F = 123;
export { E, F };
function foobar() {}
function foorbar()
{}
if () {
//
} else {}
if ()
{}
else
{}
/* some comment */{
// some code with a preceding comment
}
{
const foo = 123;
// code that just wants to be encapsulated in a block scope
}
const foo = { ...bar };
const foo = [ ...bar ];
function foo (bar, ...baz) {}
const { foo, ...bar } = baz;
type A = number | string;
type B = number | string | {result: string};
type C = {result: string} & {type: "A" | "B"};
class a {
private x = 1;
y = 1;
public z = 0;
}