Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

How can library authors test types against multiple TS versions?

未关闭
#440 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 3 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
20/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
技术栈
typescript
领域
testing, tooling

调研方向

从 dtslint README 以及 issue 中对 DefinitelyTyped-tools 和 @definitelytyped/dtslint 的引用开始。比较针对不同 TypeScript 版本测试库类型的各个方案,然后为 DefinitelyTyped 之外的库定义一种受支持的方案。完成后应包括一种有文档记录且易于维护的方式,用于运行这些跨多个版本的类型检查。

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

描述

Hello, Emotion contributor here. 👋 We have been using dtslint to check our (rather complex) TypeScript definitions against multiple versions of TypeScript.

The problem is that the dtslint README indicates that dtslint has moved into DefinitelyTyped-tools, and DefinitelyTyped-tools is not intended for public consumption.

How are library authors supposed to test their types against multiple TypeScript versions? (When the types are in the library's repository rather than DefinitelyTyped.)

Here are some options I have considered, though none of them seem particularly good:

  1. Library authors use @definitelytyped/dtslint, even though it is not intended for public consumption.
  2. Someone forks dtslint and starts maintaining it again.
  3. Someone creates a new tool that enables testing against multiple TypeScript versions.
  4. Each library that needs to test on multiple TS versions writes a script that "manually" installs different TS versions from npm.
  5. Library authors give up on testing against multiple TS versions and instead test against a specific version or tag, e.g. the latest supported TS version (3.9 currently), typescript@latest, or typescript@next.
主要语言
TypeScript
星标
423
派生
237
平均合并
18 小时 18 分钟
30 天内合并 PR
11

环境准备

我们还没有检查这个项目的环境配置文件。先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

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

microsoft/DefinitelyTyped-tools 的其他 Issue

查看 microsoft/DefinitelyTyped-tools 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

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