vuepress / vuepress-community

:bulb: Community supported ecosystem for VuePress
https://vuepress-community.netlify.app
MIT License
81 stars 62 forks source link

[Bug Report] vuepress-types: Change to PageInfo #16

Closed Mister-Hope closed 4 years ago

Mister-Hope commented 4 years ago

Describe the bug

Since the plugin options have an option called extendPageData, a lot of plugins may extends props to PageInfo. Such as @vuepress/plugin-last-updated used by the offical theme inject a prop called lastUpdated. So I think it's necessary to add a line

 [props: string]: any

in PageInfo interface.

Or we will trigger issue if we trying to access it while using the type defination.

meteorlxy commented 4 years ago

I suggest to use Module Augmentation for users who want to extend page data.

But yes the definition in page.d.ts can be enhanced.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.