mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
22 lines
578 B
TypeScript
22 lines
578 B
TypeScript
//// [tests/cases/conformance/classes/staticIndexSignature/staticIndexSignature7.ts] ////
|
|
|
|
//// [staticIndexSignature7.ts]
|
|
class X {
|
|
static [index: string]: string;
|
|
static x = 12; // Should error, incompatible with index signature
|
|
}
|
|
class Y {
|
|
static [index: string]: string;
|
|
static foo() {} // should error, incompatible with index signature
|
|
}
|
|
|
|
|
|
//// [staticIndexSignature7.js]
|
|
"use strict";
|
|
class X {
|
|
}
|
|
X.x = 12; // Should error, incompatible with index signature
|
|
class Y {
|
|
static foo() { } // should error, incompatible with index signature
|
|
}
|