Closed
Description
Vue version
3.4.37
Link to minimal reproduction
Steps to reproduce
- Open typescript playground
- Hover over
ComponentCustomProperties
orComponentCustomOptions
and inspect@example
What is expected?
Example should say to augment vue
module as stated in docs https://vuejs.org/guide/typescript/options-api.html#augmenting-global-properties. For instance
declare module 'vue' {
interface ComponentCustomProperties {
$router: Router
}
interface ComponentCustomOptions {
beforeRouteUpdate?(
to: Route,
from: Route,
next: () => void
): void
}
}
What is actually happening?
Example instructs to augment @vue/runtime-core
module.
System Info
No response
Any additional comments?
Augmentation docs were updated in this commit vuejs/docs@92f1b4b but it seems this was never reflected in JSDoc of ComponentCustomProperties
or ComponentCustomOptions
types.
This was discovered after vue-router
migrated to correct way of augmentation in 4.4.1 https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#441-2024-07-31 and this caused some disruption in type checking when combined with other packages that use vue/runtime-core
augmentation.
Willing to work on PR for this.
Metadata
Metadata
Assignees
Labels
No labels