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

tsd should be discouraged. dtslint should not be discouraged #8

Closed
wants to merge 1 commit into from

Conversation

Ore4444
Copy link

@Ore4444 Ore4444 commented Mar 20, 2020

No description provided.

@slikts
Copy link
Owner

slikts commented Mar 23, 2020

The dtslint readme actually points to tsd:

Just looking for ExpectType and ExpectError? Use tsd instead.

tsd issue comparing it it to dtslint which brings up a number of points in favor of tsd.

Comment by a dtslint developer:

dtslint is primarily for use as Definitely Typed infrastructure (or if you're building a DT-like type repository). If you are writing unit tests for types you should be using tsd instead of dtslint.

Another one:

For lighter-weight checks, try tsd, which works within the type system, giving you a library you can import into existing unit tests. It's also more usable and gives you feedback as you type.

tsd is a newer tool, but is focused on developer experience and is being improved, like by adding strict type assertions, so I think it's reasonable to recommend it over dtslint.

@Ore4444
Copy link
Author

Ore4444 commented Mar 28, 2020

Thabks for the detailed answer! I see where i got it wrong

@slikts slikts closed this Mar 28, 2020
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

Successfully merging this pull request may close these issues.

2 participants