Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This has been the recommended approach for a while and supports more cases. See https://vuejs.org/guide/typescript/options-api.html#augmenting-global-properties for more information
- Loading branch information
b7f97dd
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.
@posva
I have some concerns about this change. When using
declare module 'vue'
, then$pinia
is no longer available in template.Some times ago, a similar change has been made in
vue-router@4
Now, using
$route
and$router
in Vue Template throw the same error.I'm using Composition API and the given URL is about Options API so I don't know if it's related.
The problem exists in Vue 3.2 and 3.3
Edit:
vue-i18n
still usesdeclare '@vue/runtime-core'
and$t
is available in template. If I change it todeclare 'vue'
the same problem happens.