Skip to content

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

@thw0rted

Description

@thw0rted

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions