-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
typescriptProblem related to TS typingsProblem related to TS typings
Description
Version
4.0.0-beta.6
Reproduction link
https://github.com/aurelius333/vue-router-next-typing-repro
Steps to reproduce
Open src/views/index.vue
and look for typing errors.
What is expected?
Should be typed correctly
What is actually happening?
Error message:
Property '$route' does not exist on type 'ComponentPublicInstance<{}, {}, {}, { theRoutePath(): string; }, {}, Record<string, any>, Readonly<{}>, ComponentOptionsBase<{}, {}, {}, { theRoutePath(): string; }, {}, ComponentOptionsMixin, ComponentOptionsMixin, Record<...>, string>>'.
It looks like the types appear here: https://github.com/vuejs/vue-router-next/blob/7869764cb5fefcf1fe02521c252b3e1ee35d4180/src/index.ts#L65-L115
However, they don't seem to show up in the final distributed vue-router.d.ts
: https://unpkg.com/browse/vue-router@4.0.0-beta.6/dist/vue-router.d.ts. (I just searched for "$route
" in this file and it didn't show up.)
Metadata
Metadata
Assignees
Labels
typescriptProblem related to TS typingsProblem related to TS typings