38 lines
1.2 KiB
Plaintext
38 lines
1.2 KiB
Plaintext
==== tests/cases/conformance/classes/indexMemberDeclarations/privateIndexer2.ts (14 errors) ====
|
|
// private indexers not allowed
|
|
|
|
var x = {
|
|
private [x: string]: string;
|
|
~
|
|
!!! error TS1005: ':' expected.
|
|
~
|
|
!!! error TS1005: ',' expected.
|
|
~
|
|
!!! error TS1005: ',' expected.
|
|
~
|
|
!!! error TS1005: ':' expected.
|
|
~~~~~~
|
|
!!! error TS2304: Cannot find name 'string'.
|
|
}
|
|
~
|
|
!!! error TS1128: Declaration or statement expected.
|
|
|
|
var y: {
|
|
private[x: string]: string;
|
|
~~~~~~~
|
|
!!! error TS1131: Property or signature expected.
|
|
~
|
|
!!! error TS1005: ']' expected.
|
|
~
|
|
!!! error TS1005: ';' expected.
|
|
~
|
|
!!! error TS1128: Declaration or statement expected.
|
|
~~~~~~~
|
|
!!! error TS2304: Cannot find name 'private'.
|
|
~~~~~~
|
|
!!! error TS2304: Cannot find name 'string'.
|
|
~~~~~~
|
|
!!! error TS2304: Cannot find name 'string'.
|
|
}
|
|
~
|
|
!!! error TS1128: Declaration or statement expected. |