dev.to | 📄 原文链接 | 2026-07-31 收录

TypeScript 7 升级为何搞崩了 ESLint、ts-jest 和 ts-morph

来源:dev.to — 2026-07-31

📋 概述

TypeScript 7 的 tsgo 是 Go 语言逐行移植版(并非重写),其编程 API 要到 7.1 版本才稳定。依赖该 API 的工具——typescript-eslint 直接拒绝安装(ERESOLVE 错误)、ts-jest 停止转换测试文件、ts-morph 深度崩溃。解决方案是将 typescript 保持在 6.x 用于工具链,同时安装 @typescript/native-preview 用于 CI 的快速类型检查。

🔑 核心要点

💡 金句

Don't replace typescript in your dependencies with the 7.x line if you use typescript-eslint, ts-jest, ts-morph.
← 返回 Dev.to 首页