-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
Add type dependencies #42
Add type dependencies #42
Conversation
The dependencies on `@types/unist` and `@types/mdast` are needed to consume this package in TypeScript. If this is not defined, all dependants need to define this dependency.
😬 I thought it was the plan to not do typescript dependencies, but keep them in dev deps, so non-ts users (which are many) don’t have to download that? I’ve lost the context. |
The context has been spread across multiple projects and pull requests, and spectrum. Putting types in I think it would be best to discuss this in a centralized location, not this issue, which is one of many TypeScript related issues. I found an old post on Spectrum that’s related. Although feedback on my several PRs seems to mention the exact opposite of the conclusion there. Should this be discussed further in that post? |
What’s troublesome about that linked issue? The missing types can be installed as a dev dep, no? I agree. Either Spectrum, or the linked issue: syntax-tree/unist-util-is#14. I was under the impressions that deps was the wrong way to go, dev-deps okay, and potentially also peer-deps. |
The issue that prompted putting all |
Alright, I’d rather have no types for non-ts users, but let’s try it out! |
@remcohaszing @ChristianMurphy patch, minor, major? |
I think minor, this adds dependencies, but shouldn't break the API. 🤞 |
Released as 9.1.0! |
The dependencies on
@types/unist
and@types/mdast
are needed to consumethis package in TypeScript.
If this is not defined, all dependants need to define this dependency.
This would fix the build for remarkjs/remark-rehype#13 and all sava a lot of hassle for its dependants.