You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/tsconfig-reference/copy/en/options/erasableSyntaxOnly.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,7 @@ That means the following constructs are not supported:
13
13
*`namespace`s and `module`s with runtime code
14
14
* parameter properties in classes
15
15
* Non-ECMAScript `import =` and `export =` assignments
16
+
*`<prefix>`-style type assertions
16
17
17
18
```ts
18
19
// ❌ error: An `import ... = require(...)` alias
@@ -43,6 +44,9 @@ enum Direction {
43
44
Left,
44
45
Right,
45
46
}
47
+
48
+
// ❌ error: <prefix>-style type assertion.
49
+
const num = <number>1;
46
50
```
47
51
48
52
Similar tools like [ts-blank-space](https://github.com/bloomberg/ts-blank-space) or [Amaro](https://github.com/nodejs/amaro) (the underlying library for type-stripping in Node.js) have the same limitations.
0 commit comments