TypeScript/tests/baselines/reference/staticIndexers.errors.txt
Wenlu Wang 41dc625b0a
Add static index signature (#37797)
* Add static index

* fix lint

* make lint happy

* adjust test cases

* add more cases

* fix changes

* Add more case

* accept baseline

* fix error if extends others

* Update vfsUtil.ts

* use equal to empty array

* static signature of interface is an error

* Accept baseline

* Check index constraints for static signature

* Accpet baseline

* Fix crash

* fix crash

* Accept baseline

* Fix regression

* Fix crash

* always return new array
2021-03-26 15:30:09 -07:00

19 lines
584 B
Plaintext

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 (1 errors) ====
// static indexers not allowed
class C {
static [x: string]: string;
}
class D {
static [x: number]: string;
}
class E<T> {
static [x: string]: T;
~
!!! error TS2302: Static members cannot reference class type parameters.
}