|
1 |
| -accessorInAmbientContextES5.ts(4,14): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher. |
2 |
| -accessorInAmbientContextES5.ts(5,21): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher. |
3 |
| -accessorInAmbientContextES5.ts(6,22): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher. |
4 |
| -accessorInAmbientContextES5.ts(7,29): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher. |
5 |
| -accessorInAmbientContextES5.ts(12,18): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher. |
6 |
| -accessorInAmbientContextES5.ts(19,18): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher. |
7 | 1 | accessorInAmbientContextES5.ts(25,14): error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher.
|
8 | 2 |
|
9 | 3 |
|
10 |
| -==== accessorInAmbientContextES5.ts (7 errors) ==== |
| 4 | +==== accessorInAmbientContextES5.ts (1 errors) ==== |
11 | 5 | // Should allow accessor in ambient contexts even when targeting ES5
|
12 | 6 |
|
13 | 7 | declare class AmbientClass {
|
14 | 8 | accessor prop1: string;
|
15 |
| - ~~~~~ |
16 |
| -!!! error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher. |
17 | 9 | static accessor prop2: number;
|
18 |
| - ~~~~~ |
19 |
| -!!! error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher. |
20 | 10 | private accessor prop3: boolean;
|
21 |
| - ~~~~~ |
22 |
| -!!! error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher. |
23 | 11 | private static accessor prop4: symbol;
|
24 |
| - ~~~~~ |
25 |
| -!!! error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher. |
26 | 12 | }
|
27 | 13 |
|
28 | 14 | declare namespace AmbientNamespace {
|
29 | 15 | class C {
|
30 | 16 | accessor prop: string;
|
31 |
| - ~~~~ |
32 |
| -!!! error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher. |
33 | 17 | }
|
34 | 18 | }
|
35 | 19 |
|
36 | 20 | // Should also work in .d.ts files (simulated with declare)
|
37 | 21 | declare module "some-module" {
|
38 | 22 | export class ExportedClass {
|
39 | 23 | accessor value: any;
|
40 |
| - ~~~~~ |
41 |
| -!!! error TS18045: Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher. |
42 | 24 | }
|
43 | 25 | }
|
44 | 26 |
|
|
0 commit comments