microsoft / microsoft/DefinitelyTyped-tools
[dts-lint] Support testing multiple times with different compiler options
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 423
- Forks
- 237
- Avg merge
- 18h 18m
- Merged PRs (30d)
- 11
Description
I just created this hacky workaround to a problem that I'm not sure a lot of other users have, but I figured it was worth capturing something here.
The basic problem is that @types/node needs to behave differently depending on whether or not the consuming project includes lib-dom. I'd like to write one set of tests that runs with the option lib: ['dom'] and one without. The hacky workaround is to create a tsX.Y "version" folder, which just re-uses code and tests from another version, but has its own tsconfig file. It would be better if dts-lint supported some way of specifying multiple environments.
I don't have a specific implementation in mind. Maybe if it finds a "solution style" tsconfig.json, it would run tests once for each referenced tsconfig? Maybe dts-lint gets its own config file where I can specify an array of compiler options to change across multiple runs?
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 by reviewing dts-lint's existing handling of tsconfig.json, compiler options, and test execution. Compare the proposed solution-style referenced configurations with a dedicated dts-lint configuration, then define how multiple environments are selected and reported. Done means one test set runs successfully with and without lib-dom.
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
- 25/100