Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

How can library authors test types against multiple TS versions?

Open
#440 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 3 days

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
20/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
typescript
Domain
testing, tooling

Research direction

Start with the dtslint README and the references to DefinitelyTyped-tools and @definitelytyped/dtslint in the issue. Compare the listed approaches for testing library types across TypeScript versions, then define a supported approach for libraries outside DefinitelyTyped. Done should include a documented, maintainable way to run those multi-version type checks.

Written by the indexing model from the issue text.

Description

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.
Dominant language
TypeScript
Stars
423
Forks
237
Avg merge
18h 18m
Merged PRs (30d)
11

Getting set up

We have not checked this project's setup files yet. Start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/DefinitelyTyped-tools

All issues in microsoft/DefinitelyTyped-tools

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.