microsoft / microsoft/TypeScript
Symbol properties should not be exempt from excess property checks in presence of a string index signature
オープン
@ahejlsberg がすでに取り組んでいます。
2021年6月28日 から。
Breaking Change
Bug
Domain: check: Excess Property Checking
Rescheduled
- 主要言語
- Go
- スター
- 111k
- フォーク
- 14.4k
- 平均マージ
- 1日 19時間
- マージ済み PR(30日)
- 117
説明
In #44793, we found that a symbol index signature doesn't turn off excess property checks on symbols; 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.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
評価
この issue はまだ評価されていません。