Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dts-lint] Support testing multiple times with different compiler options #546

Open
thw0rted opened this issue Oct 18, 2022 · 0 comments
Open

Comments

@thw0rted
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant