|
1 | 1 | error TS2318: Cannot find global type 'IterableIterator'.
|
| 2 | +commonjs.cts(1,1): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. |
| 3 | +commonjs.cts(2,1): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. |
| 4 | +index.ts(3,17): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. |
| 5 | +index.ts(6,11): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. |
| 6 | +index.ts(10,11): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. |
| 7 | +index.ts(16,11): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. |
| 8 | +index.ts(17,15): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. |
| 9 | +index.ts(22,6): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. |
| 10 | +index.ts(26,1): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. |
| 11 | +index.ts(28,12): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. |
| 12 | +index.ts(67,6): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. |
| 13 | +index.ts(68,6): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. |
| 14 | +index.ts(69,7): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. |
| 15 | +index.ts(72,6): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. |
| 16 | +index.ts(73,7): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. |
| 17 | +index.ts(74,1): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. |
| 18 | +index.ts(79,11): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. |
| 19 | +index.ts(81,12): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. |
| 20 | +index.ts(86,1): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. |
| 21 | +index.ts(89,1): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. |
| 22 | +index.ts(90,1): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. |
| 23 | +index.ts(94,1): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. |
2 | 24 |
|
3 | 25 |
|
4 | 26 | !!! error TS2318: Cannot find global type 'IterableIterator'.
|
5 |
| -==== index.ts (0 errors) ==== |
| 27 | +==== index.ts (20 errors) ==== |
6 | 28 | class MyClassErr {
|
7 | 29 | // No parameter properties
|
8 | 30 | constructor(public foo: string) { }
|
| 31 | + ~~~~~~~~~~~~~~~~~~ |
| 32 | +!!! error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. |
9 | 33 | }
|
10 | 34 |
|
11 | 35 | namespace IllegalBecauseInstantiated {
|
| 36 | + ~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 37 | +!!! error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. |
12 | 38 | export const m = 1;
|
13 | 39 | }
|
14 | 40 |
|
15 | 41 | namespace AlsoIllegalBecauseInstantiated {
|
| 42 | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 43 | +!!! error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. |
16 | 44 | class PrivateClass {
|
17 | 45 |
|
18 | 46 | }
|
19 | 47 | }
|
20 | 48 |
|
21 | 49 | namespace IllegalBecauseNestedInstantiated {
|
| 50 | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 51 | +!!! error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. |
22 | 52 | namespace Nested {
|
| 53 | + ~~~~~~ |
| 54 | +!!! error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. |
23 | 55 | export const m = 1;
|
24 | 56 | }
|
25 | 57 | }
|
26 | 58 |
|
27 | 59 | enum NotLegalEnum {
|
| 60 | + ~~~~~~~~~~~~ |
| 61 | +!!! error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. |
28 | 62 | B = 1
|
29 | 63 | }
|
30 | 64 |
|
31 | 65 | import NoGoodAlias = NotLegalEnum.B;
|
| 66 | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 67 | +!!! error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. |
32 | 68 |
|
33 | 69 | const enum NotLegalConstEnum {
|
| 70 | + ~~~~~~~~~~~~~~~~~ |
| 71 | +!!! error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. |
34 | 72 | C = 2
|
35 | 73 | }
|
36 | 74 |
|
@@ -70,37 +108,65 @@ error TS2318: Cannot find global type 'IterableIterator'.
|
70 | 108 |
|
71 | 109 | // Not erasable
|
72 | 110 | (()=><any>{})();
|
| 111 | + ~~~~~ |
| 112 | +!!! error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. |
73 | 113 | (()=>< any >{})();
|
| 114 | + ~~~~~~~ |
| 115 | +!!! error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. |
74 | 116 | (()=> < any > {})();
|
| 117 | + ~~~~~~~ |
| 118 | +!!! error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. |
75 | 119 |
|
76 | 120 | // Erasable
|
77 | 121 | (()=><any>({}))();
|
| 122 | + ~~~~~ |
| 123 | +!!! error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. |
78 | 124 | (()=>(<any>{}))();
|
| 125 | + ~~~~~ |
| 126 | +!!! error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. |
79 | 127 | <any>{};
|
| 128 | + ~~~~~ |
| 129 | +!!! error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. |
80 | 130 |
|
81 | 131 |
|
82 | 132 | // return and yield ASI
|
83 | 133 | function *gen() {
|
84 | 134 | yield <any>
|
| 135 | + ~~~~~ |
| 136 | +!!! error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. |
85 | 137 | 1;
|
86 | 138 | return <any>
|
| 139 | + ~~~~~ |
| 140 | +!!! error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. |
87 | 141 | 1;
|
88 | 142 | }
|
89 | 143 |
|
90 | 144 | // at the start of an ExpressionStatement if followed by an object literal; though I'm not sure why one would use it there
|
91 | 145 | <unknown>{foo() {}}.foo();
|
| 146 | + ~~~~~~~~~ |
| 147 | +!!! error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. |
92 | 148 |
|
93 | 149 | // at the start of an ExpressionStatement if followed by function keyword
|
94 | 150 | <unknown>function() {}();
|
| 151 | + ~~~~~~~~~ |
| 152 | +!!! error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. |
95 | 153 | <unknown>function() {};
|
| 154 | + ~~~~~~~~~ |
| 155 | +!!! error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. |
96 | 156 |
|
97 | 157 | // at the start of an ExpressionStatement if followed by an anonymous class expression
|
98 | 158 | // note that this exact syntax currently emits invalid JS (no parenthesis added like for function above)
|
99 | 159 | <unknown>class {}
|
| 160 | + ~~~~~~~~~ |
| 161 | +!!! error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. |
100 | 162 |
|
101 |
| -==== commonjs.cts (0 errors) ==== |
| 163 | +==== commonjs.cts (2 errors) ==== |
102 | 164 | import foo = require("./other.cjs");
|
| 165 | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 166 | +!!! error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. |
103 | 167 | export = foo;
|
| 168 | + ~~~~~~~~~~~~~ |
| 169 | +!!! error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. |
104 | 170 |
|
105 | 171 |
|
106 | 172 | ==== other.d.cts (0 errors) ====
|
|
0 commit comments