microsoft / microsoft/TypeScript

Differential `typeToString` / smarter error truncation

オープン
#42,597 コメント 0 件 リアクション 0 件 担当者 1 名 GitHub で見る

@RyanCavanaugh がすでに取り組んでいます。

2021年2月2日 から。

Domain: Error Messages Domain: LS: Type Display Experience Enhancement Experimentation Needed
主要言語
Go
スター
111k
フォーク
14.3k
平均マージ
1日 19時間
マージ済み PR(30日)
117

説明

Lots of the time, error truncation will kick in at the most inopportune time, and lose relevant properties that will be subsequently elaborated on. @RyanCavanaugh has been thinking about a smarter version of this where we can inform our string writers to be a little smarter and not throw away the relevant members of a union, or properties of an object.

But there are some areas that we need to kind of think through and be wary of.

  1. don't repeat yourself: if you end up repeating a constituent of a union on the next line, then was it the best thing to focus on that part of the union on the prior line? You might avoid surprising a user ("where'd that type come from!?") but you're potentially not gaining anything. This leads us to
  2. don't lose the right information: error messages don't always go down the most-appropriate path. If we try to over-focus on the types that the error decided to elaborate on, we shouldn't lose relevant information from other possible types.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。