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?
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/nodeneeds to behave differently depending on whether or not the consuming project includeslib-dom. I'd like to write one set of tests that runs with the optionlib: ['dom']and one without. The hacky workaround is to create atsX.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? Maybedts-lintgets its own config file where I can specify an array of compiler options to change across multiple runs?