You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// non-static equivalent, for reference
class Q {
readonly [s: string]: number;
readonly [s: number]: 42 | 233
}
class W extends Q {
readonly [s: string]: number
}
class EW extends W {
readonly [s: string]: boolean
readonly [s: number]: 1
}
// static example
class B {
static readonly [s: string]: number;
static readonly [s: number]: 42 | 233
}
class D extends B {
static readonly [s: string]: number
}
class ED extends D {
static readonly [s: string]: boolean
static readonly [s: number]: 1 // should error, 1 isn't assignable to `boolean`!
}
🙁 Actual behavior
No error.
🙂 Expected behavior
Numeric index type '1' is not assignable to string index type 'boolean'.
The text was updated successfully, but these errors were encountered:
⏯ Playground Link
Playground link
💻 Code
🙁 Actual behavior
No error.
🙂 Expected behavior
Numeric index type '1' is not assignable to string index type 'boolean'.
The text was updated successfully, but these errors were encountered: