TypeScript has rapidly become a popular language for modern web development, yet its effect on software faults remains poorly understood. This paper presents the first large-scale empirical study of bugs in real-world TypeScript projects. We analyze 633 bug reports from 16 popular open-source repositories to construct a taxonomy of fault types, quantify their prevalence, and relate them to project characteristics such as size, domain, and dependency composition. Our results reveal a fault landscape dominated not by logic or syntax errors but by tooling and configuration faults, API misuses, and asynchronous error-handling issues. We show that these categories correlate strongly with build complexity and dependency heterogeneity, indicating that modern failures often arise at integration and orchestration boundaries rather than within algorithmic logic. A longitudinal comparison with JavaScript studies shows that while static typing in TypeScript has reduced traditional runtime and type errors, it has shifted fragility toward build systems and toolchains. These findings offer new insight into how language design and ecosystem evolution reshape the fault profiles of large-scale software systems.
翻译:TypeScript已迅速成为现代Web开发的热门语言,但其对软件故障的影响仍鲜为人知。本文首次对实际TypeScript项目中的缺陷进行了大规模实证研究。通过分析16个热门开源仓库中的633份缺陷报告,我们构建了故障类型的分类体系,量化了其普遍性,并将其与项目规模、领域及依赖构成等特征相关联。研究结果表明,故障分布并非以逻辑或语法错误为主,而是以工具链与配置故障、API误用以及异步错误处理问题为主导。我们证明这些故障类别与构建复杂度及依赖异构性存在强相关性,表明现代故障往往产生于集成与编排边界,而非算法逻辑内部。与JavaScript研究的纵向对比显示,虽然TypeScript的静态类型系统减少了传统运行时和类型错误,却将系统脆弱性转移至构建系统和工具链。这些发现为理解语言设计与生态系统演化如何重塑大规模软件系统的故障特征提供了新的见解。