microsoft / microsoft/TypeScript

npx tsc -w is triggering itself after each build

未关闭
#64,037 5 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

Needs More Info
主要语言
Go
星标
111k
派生
14.3k
平均合并
2 天 4 小时
30 天内合并 PR
132

描述

🔎 Search Terms

No amount of exclude or watchOptions seems to have any impact.

I am outputting my JavaScript files along side my TS files, which is what I want, I don't know why it keeps retriggering itself

Output looks like this

> npx tsc --watch --extendedDiagnostics
[08:05:29 PM] Starting compilation in watch mode...

[08:05:29 PM] Found 0 errors. Watching for file changes.

[08:05:29 PM] File change detected. Starting incremental compilation...

[08:05:30 PM] Found 0 errors. Watching for file changes.

[08:05:30 PM] File change detected. Starting incremental compilation...

[08:05:31 PM] Found 0 errors. Watching for file changes.

[08:05:31 PM] File change detected. Starting incremental compilation...

[08:05:31 PM] Found 0 errors. Watching for file changes.

[08:05:32 PM] File change detected. Starting incremental compilation...

[08:05:32 PM] Found 0 errors. Watching for file changes.

npx tsc --showConfig doesn't show any watchOptions not sure if they are getting picked up

🕗 Version & Regression Information
"name": "@typescript/typescript-win32-x64",
"version": "7.0.2",
⏯ Playground Link

No response

💻 Code

No response

🙁 Actual behavior

tsc -w triggers itself in a loop

🙂 Expected behavior

tsc -w doesn't triggers itself in a loop

Additional information about the issue

No response

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先使用报告的 npx tsc --watch --extendedDiagnostics 命令,以及将 JavaScript 输出到 TypeScript 文件旁边的项目配置,重现该循环。检查 watchOptions 和已输出文件如何与 watch 模式交互;当编译完成且不再将自身输出检测为重复的文件更改时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
typescript
领域
build-system, compilers
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
活跃
描述清晰度
需要澄清
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。