microsoft / microsoft/TypeScript
Expose "getNewLineCharacter" function
オープン
まだ誰も着手していません。
Domain: API
In Discussion
Suggestion
- 主要言語
- Go
- スター
- 111k
- フォーク
- 14.3k
- 平均マージ
- 1日 19時間
- マージ済み PR(30日)
- 117
説明
Suggestion
Make ts.getNewLineCharacter public
Use Cases
This is useful if developers create their own FormatDiagnosticsHost, but don't want to implement the logic to determine the newLine string based on the newLine compiler option.
Examples
const formatHost: ts.FormatDiagnosticsHost = {
getCurrentDirectory: () => projectDir || ts.sys.getCurrentDirectory(),
getCanonicalFileName: fileName => fileName,
getNewLine: () => ts.getNewLineCharacter(formatOptions)
};
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、既存の ts.getNewLineCharacter の実装と、公開されているコンパイラー API の宣言を見つけます。FormatDiagnosticsHost と newLine コンパイラーオプションが現在どのように公開されているかを確認し、その後、関数を公開呼び出し可能にして、使用例から選択された改行文字を取得できることを検証します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- typescript
- 領域
- compilers
- issue の種類
- 機能追加
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 48/100