microsoft / microsoft/TypeScript

[isolatedDeclarations] Should imported JSON files be emitted when "resolveJsonModules", "emitDeclarationOnly", and "isolatedDeclarations" are all enabled?

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

@sheetalkamat がすでに取り組んでいます。

2024年6月18日 から。

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

説明

🔍 Search Terms

json, resolvejsonmodules, isolateddeclarations, emit, declarations, import, emitDeclarationOnly

✅ Viability Checklist
⭐ Suggestion

Emit/transpile JSON files when the aforementioned compile options are enabled

📃 Motivating Example

The primary purpose of isolated declarations is to be able to emit declarations for a project without needing to typecheck it and one of the main motivators for that is being able to start typechecking downstream projects, e.g. in a composite build, without waiting for typecheck.

It might be fair to say then that it would be good for downstream projects to be able to start typechecking without waiting for their dependees to transpile code. Even with isolated declarations, this is not possible at the moment, because types may depend on JSON files when resolveJsonModules is enabled, and JSON files are only emitted/copied when JS transpilation is enabled, i.e. "emitDeclarationOnly": false.

💻 Use Cases

Being able to typecheck a composite project in parallel where sub-projects are configured with

    "isolatedDeclarations": true,
    "emitDeclarationOnly": true,
    "resolveJsonModule": true,

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

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

はじめの一歩

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

評価

この issue はまだ評価されていません。

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

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