microsoft / microsoft/TypeScript
Gracefully handle template literal properties in the parser
オープン
まだ誰も着手していません。
Domain: Error Messages
Effort: Moderate
Experience Enhancement
Help Wanted
- 主要言語
- Go
- スター
- 111k
- フォーク
- 14.3k
- 平均マージ
- 2日 4時間
- マージ済み PR(30日)
- 132
説明
var x = {
a: "Hello"
`b`: 123
}
Right now, the parser encounters the template string, decides it should bail out of object literal parsing, and we more or less recover thinking we have something like the following:
var x = ({ a: "Hello" } `b`) : 123 }
So we'll report an error on what we think is:
{ a: "Hello" } `b`
- On the syntactic layer under ES5 mode, we'll say tagged templates are not supported unless in ES6.
- On the semantic layer, we'll say
{ a: "Hello" }is not invokable.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
parser のオブジェクトリテラル処理から始め、ES5 モードと ES6 モードで、示されている template literal プロパティのケースを再現します。template string で parser がどのようにリカバリするかを追跡し、得られる構文診断と意味診断を比較します。この不正な、またはサポートされていない構文要素が、タグ付き呼び出しとして誤って解釈されることなく、適切な診断を受ければ完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- typescript
- 領域
- compilers
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100