-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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: add typescript typings for @mdx-js/mdx, @mdx-js/react, @mdx-js/runtime, and @mdx-js/vue #811
Conversation
This pull request is being automatically deployed with ZEIT Now (learn more). 🔍 Inspect: https://zeit.co/mdx/mdx/hho2n3q5v |
08b8ca2
to
2f654e6
Compare
Thanks for this! I think it makes sense for the types to live in the monorepo 👍. Since we're probably about a month out from a v2 release maybe that's when we can merge in the types to make sure we avoid possible breakage? You mind maybe pointing this PR to the v2 branch and then we can merge it @ChristianMurphy (when ready)? |
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.
I don't use TypeScript so we probably want more eyes on this, but lgtm! 🙏 💟
This comment has been minimized.
This comment has been minimized.
2f654e6
to
08ca639
Compare
re-targeted and re-based off |
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.
typings for @mds-js/loader
and @mdx/vue-loader
have also been added.
Documentation for typescript has been updated to reflect new types.
docs/advanced/typescript.mdx
Outdated
export type Components = { | ||
[key in ComponentType]?: React.ComponentType<{ children: React.ReactNode }> | ||
} | ||
* \\\\\\\\\\`@mdx-js/mdx` |
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.
The backslashes were added by prettier 🤷♂️
5b2d76f
to
e8fdf1d
Compare
Going to go ahead and merge into v2. We'l prolly want to verify we don't need any changes after all v2 updates are made, but there shouldn't actually be any breaking changes for users so it probably won't be an issue. Thanks! |
This adds typings for
@mdx-js/mdx
,@mdx-js/react
,@mdx-js/runtime
, and@mdx-js/vue
.A few notes on the typings
/cc @Rokt33r