microsoft / microsoft/DefinitelyTyped-tools
How can library authors test types against multiple TS versions?
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 423
- Forks
- 237
- Avg merge
- 18h 18m
- Merged PRs (30d)
- 11
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:
- Library authors use
@definitelytyped/dtslint, even though it is not intended for public consumption. - Someone forks dtslint and starts maintaining it again.
- Someone creates a new tool that enables testing against multiple TypeScript versions.
- Each library that needs to test on multiple TS versions writes a script that "manually" installs different TS versions from npm.
- 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, ortypescript@next.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
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.
Assessment
- Tech stack
- typescript
- Domain
- testing, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100