41dc625b0a
* 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
21 lines
694 B
Plaintext
21 lines
694 B
Plaintext
=== tests/cases/conformance/classes/staticIndexSignature/staticIndexSignature7.ts ===
|
|
class X {
|
|
>X : Symbol(X, Decl(staticIndexSignature7.ts, 0, 0))
|
|
|
|
static [index: string]: string;
|
|
>index : Symbol(index, Decl(staticIndexSignature7.ts, 1, 12))
|
|
|
|
static x = 12; // Should error, incompatible with index signature
|
|
>x : Symbol(X.x, Decl(staticIndexSignature7.ts, 1, 35))
|
|
}
|
|
class Y {
|
|
>Y : Symbol(Y, Decl(staticIndexSignature7.ts, 3, 1))
|
|
|
|
static [index: string]: string;
|
|
>index : Symbol(index, Decl(staticIndexSignature7.ts, 5, 12))
|
|
|
|
static foo() {} // should error, incompatible with index signature
|
|
>foo : Symbol(Y.foo, Decl(staticIndexSignature7.ts, 5, 35))
|
|
}
|
|
|