TypeScript/tests/baselines/reference/staticIndexers.errors.txt
2016-01-13 18:35:51 -08:00

28 lines
1.3 KiB
Plaintext

tests/cases/conformance/classes/indexMemberDeclarations/staticIndexers.ts(4,5): error TS1071: 'static' modifier cannot appear on an index signature.
tests/cases/conformance/classes/indexMemberDeclarations/staticIndexers.ts(8,5): error TS1071: 'static' modifier cannot appear on an index signature.
tests/cases/conformance/classes/indexMemberDeclarations/staticIndexers.ts(12,5): error TS1071: 'static' modifier cannot appear on an index signature.
tests/cases/conformance/classes/indexMemberDeclarations/staticIndexers.ts(12,25): error TS2302: Static members cannot reference class type parameters.
==== tests/cases/conformance/classes/indexMemberDeclarations/staticIndexers.ts (4 errors) ====
// static indexers not allowed
class C {
static [x: string]: string;
~~~~~~
!!! error TS1071: 'static' modifier cannot appear on an index signature.
}
class D {
static [x: number]: string;
~~~~~~
!!! error TS1071: 'static' modifier cannot appear on an index signature.
}
class E<T> {
static [x: string]: T;
~~~~~~
!!! error TS1071: 'static' modifier cannot appear on an index signature.
~
!!! error TS2302: Static members cannot reference class type parameters.
}