Open
Description
In #44793, we found that a symbol
index signature doesn't turn off excess property checks on symbol
s; however, a string
index signature turns these excess property checks entirely.
interface A {
a?: string
b?: number
[key: string]: unknown
}
const symbolKey = Symbol('key')
const a: A = {
[symbolKey]: '123', // works!
}
It's likely that some users relied on this behavior; however, those users will be able to use symbol
index signatures in TypeScript 4.4.