20 lines
584 B
Plaintext
20 lines
584 B
Plaintext
==== tests/cases/conformance/classes/indexMemberDeclarations/staticIndexers.ts (3 errors) ====
|
|
// static indexers not allowed
|
|
|
|
class C {
|
|
static [x: string]: string;
|
|
~~~~~~
|
|
!!! error TS1145: Modifiers not permitted on index signature members.
|
|
}
|
|
|
|
class D {
|
|
static [x: number]: string;
|
|
~~~~~~
|
|
!!! error TS1145: Modifiers not permitted on index signature members.
|
|
}
|
|
|
|
class E<T> {
|
|
static [x: string]: T;
|
|
~~~~~~
|
|
!!! error TS1145: Modifiers not permitted on index signature members.
|
|
} |