microsoft / microsoft/TypeScript

Cache Declarations Directory

オープン
#60,905 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

Needs Proposal Suggestion
主要言語
Go
スター
111k
フォーク
14.4k
平均マージ
1日 19時間
マージ済み PR(30日)
117

説明

🔍 Search Terms

cache declarations cached tsserver tsc

✅ Viability Checklist
⭐ Suggestion

A cache directory for declaration files that can be used both for normal type declaration and for tsserver.

This would be a shared folder to use for type definitions in development and possibly for build steps.

A separate folder could mean you have one service that could have it's own optimizations running in parallel or for some part of the project and emitting the declaration files, while the rest is worked normally or even tsserver rely only those declarations.

📃 Motivating Example

https://github.com/trpc/trpc/discussions/2448#discussioncomment-11151754

💻 Use Cases

With tools that relies heavily on TS, some projects see inference times of seconds and have to rely on splitting code into a monorepo or some indirect compilation step and then depending on those types.

  1. What do you want to use this for?

Faster inference in large projects with tooling with complex, nested types.

  1. What shortcomings exist with current approaches?

Some relies on splitting code into a monorepo, others you need multiple tsconfigs so you can generate the types in one place and then reference them in the actual code, making indirections on the type system to keep the inference speed.

  1. What workarounds are you using in the meantime?

Have a parallel config to generate types and change a critical entrypoint to use the generated types instead of the normally inferred one.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず提案、ユースケース、リンクされた trpc の議論を確認し、必要な declaration-cache の動作を明確にします。完了とみなすには、通常の宣言の使用、tsserver、および場合によってはビルド手順をサポートする共有キャッシュディレクトリを定義し、そのスコープと統合ポイントを指定する必要があります。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
typescript
領域
compilers
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。