Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Allow types field in tsconfig #263

Open
OliverJAsh opened this issue Nov 4, 2019 · 2 comments
Open

Allow types field in tsconfig #263

OliverJAsh opened this issue Nov 4, 2019 · 2 comments

Comments

@OliverJAsh
Copy link
Contributor

Hi,

We want to use dtslint solely for the expect rule it provides. We have evaluated alternative tools such as tsd (as recommended in the README) but they do not yet provide all the behavior we need.

However, the dtslint CLI disallows the types compiler option. This probably makes sense for DefinitelyTyped, but it doesn't seem to make sense for other projects where this tool may be used.

Does it make sense to allow the types field, perhaps as a flag to the CLI?

@OliverJAsh
Copy link
Contributor Author

Hey @sandersn, would you consider a PR for this?

@sandersn
Copy link
Member

Well, I'd prefer to see a PR to tsd, since you only want expect from dtslint anyway. I'd prefer to keep dtslint as single-purpose as possible to reduce the security complexity for types publishing. Simplicity is a distant ideal for dtslint, I know, but I don't want to move further away from it.

Side note: the kind of test you proposed on the tsd repo sounds to me like it's only appropriate for the public API. In that case, it does seem reasonable to write tests against the generated d.ts. For Typescript we use a baseline test, but a series of unit tests would be about the same. As you point out, of course, the workflow for generating a d.ts to test is more involved.

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

No branches or pull requests

2 participants