microsoft / microsoft/TypeScript
Support for custom Automatic Type Acquisition scopes.
まだ誰も着手していません。
- 主要言語
- Go
- スター
- 111k
- フォーク
- 14.4k
- 平均マージ
- 1日 19時間
- マージ済み PR(30日)
- 117
説明
Search Terms
Automatic type acquisition scopes, custom type acquisition, acquire types from custom scope
Suggestion
The ability to specify in .tsconfig and/or IDE settings additional scopes to search beyond @types for type acquisition.
Use Cases
Private repositories with large amounts of JavaScript code and a small number of TypeScript developers who wish to produce accurate typings, and a high barrier to entry to modifying/adding declaration files to the JavaScript projects. This mirrors the public ecosystem with say, react and @types/react.
Examples
A new string array parameter of scopes to search for:
{
"typeAcquisition": {
"searchScopes": [
"@companyname-types",
"@types"
]
}
}
This would also allow overriding the @types scope. The first scope with a matching declaration should win.
Checklist
My suggestion meets these guidelines:
[X] This wouldn't be a breaking change in existing TypeScript / JavaScript code
[X] This wouldn't change the runtime behavior of existing JavaScript code
[X] This could be implemented without emitting different JS based on the types of the expressions
[X] This isn't a runtime feature (e.g. new expression-level syntax)
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、自動型取得の実装と tsconfig における typeAcquisition の処理を特定し、宣言パッケージのスコープが現在どのように解決されているかを追跡します。順序と @types のオーバーライドを含む searchScopes の設定動作を定義し、最初に一致する宣言スコープが選択されることを示すテストカバレッジを追加します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, typescript
- 領域
- tooling
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100