-
Notifications
You must be signed in to change notification settings - Fork 40
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: support markdown options in markdown plugins #145
base: main
Are you sure you want to change the base?
Conversation
Pull Request Test Coverage Report for Build 9124427441Details
💛 - Coveralls |
Removed Users can import types in the following ways: /// <reference types="@vuepress/plugin-markdown-image/types" />
/// <reference types="@vuepress/plugin-markdown-math/types" />
export default {
markdown: {
image: {},
math: {},
}
} |
I am expecting these types can be automatically loaded when users are importing those plugins. Can we do that by importing the reference inside the node entrance? |
Currently, this is the only way to ensure the correct extension of typescript types. |
Cc @meteorlxy , So I think we might need a string unknown for markdown, or a new generic for defineUserConfig |
"outDir": "./lib" | ||
"outDir": "./lib", | ||
"paths": { | ||
"@vuepress/markdown": ["./src/types.d.ts"] |
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.
It would be verbose to require this config. What about putting the declare module
clause inside options.ts
?
Here's an example: https://github.com/mdit-vue/mdit-vue/blob/0a1eb8580499aa7d0db6ea7c14fad58717448fbb/packages/plugin-sfc/src/types.ts#L78 |
No description provided.