microsoft / microsoft/TypeScript
API: incorrect declarations in types.ts
まだ誰も着手していません。
- 主要言語
- Go
- スター
- 111k
- フォーク
- 14.4k
- 平均マージ
- 1日 19時間
- マージ済み PR(30日)
- 117
説明
The --strictNullChecks PR changed some declarations in types.ts to avoid frequent assertions in the compiler's code. Unfortunately these changes make it really unsafe for API users because they no longer contain the actually nullable types: https://github.com/Microsoft/TypeScript/pull/22088#discussion_r184149465 https://github.com/Microsoft/TypeScript/pull/22088#discussion_r184155027
ts.Node#parentis no longer optional (which is definitely wrong forSourceFile)ts.Symbol#declarationsandts.Symbol.valueDeclarationare no longer optional, but can still be undefinedts.Type#symbolis no longer optional, but I guess this comment is still up to date:// Symbol associated with type (if any)
These changes should either be reverted or replaced in the published declaration files.
/cc @andy-ms @weswigham
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
types.ts の宣言から始め、strictNullChecks の変更に関するリンク先の議論を確認してください。ts.Node#parent、ts.Symbol#declarations、ts.Symbol.valueDeclaration、ts.Type#symbol の公開済みの宣言ファイルを確認してください。これらの宣言が、issue に記載された nullable または存在しない値を正しく許容していれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- typescript
- 領域
- api
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100