1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
tests/cases/conformance/classes/members/privateNames/privateNameES5Ban.ts(3,5): error TS18028: Private identifiers are only available when targeting ECMAScript 2015 and higher.
tests/cases/conformance/classes/members/privateNames/privateNameES5Ban.ts(4,5): error TS18022: A method cannot be named with a private identifier.
tests/cases/conformance/classes/members/privateNames/privateNameES5Ban.ts(5,5): error TS18019: 'static' modifier cannot be used with a private identifier.
tests/cases/conformance/classes/members/privateNames/privateNameES5Ban.ts(6,12): error TS18022: A method cannot be named with a private identifier.
tests/cases/conformance/classes/members/privateNames/privateNameES5Ban.ts(7,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/conformance/classes/members/privateNames/privateNameES5Ban.ts(7,9): error TS18023: An accessor cannot be named with a private identifier.
tests/cases/conformance/classes/members/privateNames/privateNameES5Ban.ts(8,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/conformance/classes/members/privateNames/privateNameES5Ban.ts(8,9): error TS18023: An accessor cannot be named with a private identifier.
tests/cases/conformance/classes/members/privateNames/privateNameES5Ban.ts(9,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/conformance/classes/members/privateNames/privateNameES5Ban.ts(9,16): error TS18023: An accessor cannot be named with a private identifier.
tests/cases/conformance/classes/members/privateNames/privateNameES5Ban.ts(10,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/conformance/classes/members/privateNames/privateNameES5Ban.ts(10,16): error TS18023: An accessor cannot be named with a private identifier.
==== tests/cases/conformance/classes/members/privateNames/privateNameES5Ban.ts (12 errors) ====
class A {
constructor() {}
#field = 123;
~~~~~~
!!! error TS18028: Private identifiers are only available when targeting ECMAScript 2015 and higher.
#method() {}
~~~~~~~
!!! error TS18022: A method cannot be named with a private identifier.
static #sField = "hello world";
~~~~~~
!!! error TS18019: 'static' modifier cannot be used with a private identifier.
static #sMethod() {}
~~~~~~~~
!!! error TS18022: A method cannot be named with a private identifier.
get #acc() { return ""; }
~~~~
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
~~~~
!!! error TS18023: An accessor cannot be named with a private identifier.
set #acc(x: string) {}
~~~~
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
~~~~
!!! error TS18023: An accessor cannot be named with a private identifier.
static get #sAcc() { return 0; }
~~~~~
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
~~~~~
!!! error TS18023: An accessor cannot be named with a private identifier.
static set #sAcc(x: number) {}
~~~~~
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
~~~~~
!!! error TS18023: An accessor cannot be named with a private identifier.
}
|