-
-
Notifications
You must be signed in to change notification settings - Fork 66
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 demands to have index.d.ts where it is not required #84
Comments
Even with a |
Any progress on this? Roughly eight months ago I remember having to deal with this rather annoying bug; now I'm having to use this package again and it seems the way I previously got around this does not work. As of now, |
@StreetStrider Does your My understanding is that |
@UselessPickles that is not exactly my case. package.json |
@StreetStrider Sounds like this might be a duplicate of (or similar to) #32. See my comment for a workaround: #32 (comment) |
@UselessPickles thanks. That's indeed looks similar. I ended up using dtslint, but it also has its issues (and it is more complex). I solve them similar to your workaround, by creating test subproject with it's own tsconfig which satisfies all limitations. Both systems are not ideal for me and have issues. My use-case is to have expect-typish like tests in my project. I believe, TS projects must have type tests just like they have unit-tests. Having positive and negative type tests is the only way to guarantee your types are correct and that they can be consumed by library user. |
@SamVerschueren I've tested it out, it seems that it suffices to have a Do you mind if I implement this logic or do you insist on having an explicit |
@sindresorhus Not sure whether I should start implementing it because I don't know whether this is intended behavior or not. @SamVerschueren doesn't answer, do you have an opinion on this? |
@BendingBender feel free to pick it up! Didn't knew that a typings field was not necessary. Seems like a good one to have 👍. |
Allow omitting `types` property for non-barrel main when `.d.ts` file name matches `main`. Fixes tsdjs#84
Allow omitting `types` property for non-barrel main when `.d.ts` file name matches `main`. Fixes #84
Consider we have package with single module
foo.js
and definitions infoo.d.ts
. We got"main": "foo.js"
.If we run tsd on such package, we got:
However, this file is redundant at such case.
The text was updated successfully, but these errors were encountered: