25 lines
No EOL
1 KiB
Text
25 lines
No EOL
1 KiB
Text
tests/cases/conformance/classes/indexMemberDeclarations/publicIndexer.ts(4,5): error TS1145: Modifiers not permitted on index signature members.
|
|
tests/cases/conformance/classes/indexMemberDeclarations/publicIndexer.ts(8,5): error TS1145: Modifiers not permitted on index signature members.
|
|
tests/cases/conformance/classes/indexMemberDeclarations/publicIndexer.ts(12,5): error TS1145: Modifiers not permitted on index signature members.
|
|
|
|
|
|
==== tests/cases/conformance/classes/indexMemberDeclarations/publicIndexer.ts (3 errors) ====
|
|
// public indexers not allowed
|
|
|
|
class C {
|
|
public [x: string]: string;
|
|
~~~~~~
|
|
!!! error TS1145: Modifiers not permitted on index signature members.
|
|
}
|
|
|
|
class D {
|
|
public [x: number]: string;
|
|
~~~~~~
|
|
!!! error TS1145: Modifiers not permitted on index signature members.
|
|
}
|
|
|
|
class E<T> {
|
|
public [x: string]: T;
|
|
~~~~~~
|
|
!!! error TS1145: Modifiers not permitted on index signature members.
|
|
} |