microsoft / microsoft/TypeScript
Support evolving the type with assignments for expando object
まだ誰も着手していません。
- 主要言語
- Go
- スター
- 111k
- フォーク
- 14.3k
- 平均マージ
- 1日 19時間
- マージ済み PR(30日)
- 117
説明
Copied from https://github.com/Microsoft/TypeScript/issues/12278#issuecomment-261000712
OP = @abgivant
I use a similar module pattern in an application I'm working on, and the lack of IntelliSense/definitions for those has been an issue for me as well.
Mine follow this basic pattern:
module.exports = function(x, y, z) {
var exports = {};
exports.method = function() {
// Something that might use x, y, or z
};
return exports;
}
Would it be possible to do something like include an option in the jsconfig.json file to specify a property name or list of names to track when determining module exports?
Maybe something like this?
{
"moduleOptions": {
"exportProperty": ["exports", "this"]
}
}
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
CommonJS モジュールパターンと、jsconfig.json に提案されている moduleOptions 設定から始めます。欠落している IntelliSense と定義の動作を再現し、その後、expando オブジェクトへの代入を TypeScript がどのように処理するかを追跡します。完了の条件は、要求された export プロパティが型情報内で発展し、設定の動作がテストでカバーされていることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, typescript
- 領域
- compilers, developer-experience
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100