|
1 | 1 | constAssertions.ts(44,32): error TS2540: Cannot assign to 'x' because it is a read-only property.
|
2 |
| -constAssertions.ts(61,10): error TS1355: A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals. |
3 |
| -constAssertions.ts(62,10): error TS1355: A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals. |
4 |
| -constAssertions.ts(63,10): error TS1355: A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals. |
| 2 | +constAssertions.ts(61,10): error TS1355: A 'const' assertion can only be applied to references to enum members, or string, number, boolean, array, or object literals. |
| 3 | +constAssertions.ts(62,10): error TS1355: A 'const' assertion can only be applied to references to enum members, or string, number, boolean, array, or object literals. |
| 4 | +constAssertions.ts(63,10): error TS1355: A 'const' assertion can only be applied to references to enum members, or string, number, boolean, array, or object literals. |
5 | 5 | constAssertions.ts(118,3): error TS2322: Type '3' is not assignable to type '2'.
|
6 | 6 |
|
7 | 7 |
|
@@ -70,13 +70,13 @@ constAssertions.ts(118,3): error TS2322: Type '3' is not assignable to type '2'.
|
70 | 70 |
|
71 | 71 | let e1 = v1 as const; // Error
|
72 | 72 | ~~
|
73 |
| -!!! error TS1355: A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals. |
| 73 | +!!! error TS1355: A 'const' assertion can only be applied to references to enum members, or string, number, boolean, array, or object literals. |
74 | 74 | let e2 = (true ? 1 : 0) as const; // Error
|
75 | 75 | ~~~~~~~~~~~~~~
|
76 |
| -!!! error TS1355: A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals. |
| 76 | +!!! error TS1355: A 'const' assertion can only be applied to references to enum members, or string, number, boolean, array, or object literals. |
77 | 77 | let e3 = id(1) as const; // Error
|
78 | 78 | ~~~~~
|
79 |
| -!!! error TS1355: A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals. |
| 79 | +!!! error TS1355: A 'const' assertion can only be applied to references to enum members, or string, number, boolean, array, or object literals. |
80 | 80 |
|
81 | 81 | let t1 = 'foo' as const;
|
82 | 82 | let t2 = 'bar' as const;
|
|
0 commit comments