microsoft / microsoft/TypeScript
Richer Diagnostic Display Meta-Issue
まだ誰も着手していません。
- 主要言語
- Go
- スター
- 111k
- フォーク
- 14.3k
- 平均マージ
- 2日 4時間
- マージ済み PR(30日)
- 132
説明
This issue tracks a couple of different useful ideas for making diagnostics "richer" for display purposes. We've wanted some of these for a while, and they're partially inspired by testing tools like Jest and Mocha. We've also seen tools like Rust, Rome, and Flow prove them out to some extent.
Long-term, you could imagine them being interactive with the a richer compiler client.
Printing Messages Across Lines
Types can get unwieldy, and displaying them inline makes it harder to see where things begin/end.
Type
{ x: string, y: number }
is not assignable to
{ x: string, y: string }
Notice no punctuation at the end. Not sure if we can generalize messages that way.
Also not sure how this plays well with
- tools that parse our output.
- diagnostic elaborations
Highlighted Spans in Messages
Imagine being able to highlight individual sections inside of types to indicate where the issue occurs.
vvvvvvvvvvv
Type '{ a: string; b: number; c: boolean; }' is not assignable to type '{ a: string; b: number; }'.
^^^^^^^^^^^
Object literal may only specify known properties, and 'c' does not exist in type '{ a: string; b: number; }'.
Diff Highlighting in Messages
Basically imagine red being the provided color, with green being an expected color.
Type '[string, number, boolean]' is not assignable to type '[string, string, boolean]'.
^^^^^^ ^^^^^^
rrrrrr gggggg
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
ファイル、テスト、エントリポイントは指定されていません。まず、提案されている3つの領域—複数行メッセージ、ハイライトされたスパン、差分のハイライト—と、それぞれの互換性に関する懸念を確認し、その後、範囲を限定した実装を提案する前に、関連する診断表示コードとテストを特定してください。完了とするには、合意された設計と、選択した診断動作の検証が必要です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- typescript
- 領域
- compilers
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100