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
feat: TS type information for remark-stringify and remark-parse #383
Conversation
6095a3a
to
a53b3a6
Compare
cd65c09
to
c6e6fd5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check the prior works in unified ecosystem. vfile/vfile#33
And please update https://github.com/remarkjs/remark/blob/master/package.json too.
- Update
format
script for prettier to format.ts
files also.
packages/remark-cli/cli.js . -qfo && prettier --write '**/*.{js,ts}' && xo --fix
- Add
test-types
script to test types of each package vialerna
. - Append
npm run test-types
totest
script.
BTW, thanks for the contribution! 😄
2b45319
to
7cb0218
Compare
7cb0218
to
b6b70b8
Compare
dtslint is too heavy. I don't think we have to install it for each package.
Block tockenizers don't need it.
Functions with props are available from v3.1.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wooorm I reviewed it again. It looks good to me now.
The only problem is how should we deploy this. The change will force adopters to use typescript v3.2 or above. So I think we should increase major version.
Perfect! Yes, remark is about to be updated with a major version, so that’s fine! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does remark itself need types?
Related to remarkjs/remark#383. Closes GH-58. Reviewed-by: Junyoung Choi <fluke8259@gmail.com> Reviewed-by: Titus Wormer <tituswormer@gmail.com>
Related to remarkjs/remark#383. Closes GH-59. Reviewed-by: Junyoung Choi <fluke8259@gmail.com> Reviewed-by: Titus Wormer <tituswormer@gmail.com>
@wooorm good call, remark itself also has types in the latest updates to this PR |
This pull request adds typescript ambient type information for the
remark-stringify
package, as well as acceptance tests for types that's run in CI as a second Travis-CI stageThis change enables things TypeScript consumers to do things like this