62 lines
3.7 KiB
Plaintext
62 lines
3.7 KiB
Plaintext
tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(3,17): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(4,17): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(8,24): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(9,24): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(15,1): error TS2341: Property 'x' is private and only accessible within class 'C'.
|
|
tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(16,1): error TS2341: Property 'y' is private and only accessible within class 'C'.
|
|
tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(17,1): error TS2341: Property 'y' is private and only accessible within class 'C'.
|
|
tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(18,1): error TS2341: Property 'foo' is private and only accessible within class 'C'.
|
|
tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(20,1): error TS2341: Property 'a' is private and only accessible within class 'C'.
|
|
tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(21,1): error TS2341: Property 'b' is private and only accessible within class 'C'.
|
|
tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(22,1): error TS2341: Property 'b' is private and only accessible within class 'C'.
|
|
tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(23,1): error TS2341: Property 'foo' is private and only accessible within class 'C'.
|
|
|
|
|
|
==== tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts (12 errors) ====
|
|
class C {
|
|
private x: string;
|
|
private get y() { return null; }
|
|
~
|
|
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
private set y(x) { }
|
|
~
|
|
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
private foo() { }
|
|
|
|
private static a: string;
|
|
private static get b() { return null; }
|
|
~
|
|
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
private static set b(x) { }
|
|
~
|
|
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
private static foo() { }
|
|
}
|
|
|
|
var c: C;
|
|
// all errors
|
|
c.x;
|
|
~~~
|
|
!!! error TS2341: Property 'x' is private and only accessible within class 'C'.
|
|
c.y;
|
|
~~~
|
|
!!! error TS2341: Property 'y' is private and only accessible within class 'C'.
|
|
c.y = 1;
|
|
~~~
|
|
!!! error TS2341: Property 'y' is private and only accessible within class 'C'.
|
|
c.foo();
|
|
~~~~~
|
|
!!! error TS2341: Property 'foo' is private and only accessible within class 'C'.
|
|
|
|
C.a;
|
|
~~~
|
|
!!! error TS2341: Property 'a' is private and only accessible within class 'C'.
|
|
C.b();
|
|
~~~
|
|
!!! error TS2341: Property 'b' is private and only accessible within class 'C'.
|
|
C.b = 1;
|
|
~~~
|
|
!!! error TS2341: Property 'b' is private and only accessible within class 'C'.
|
|
C.foo();
|
|
~~~~~
|
|
!!! error TS2341: Property 'foo' is private and only accessible within class 'C'. |