-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
Lack of context typing with useNuxtApp
#539
Comments
I think duplicate of this #465 |
Same problem for me, as a workaround, I use : const { nuxt2Context: { $repository, $toast, $i18n } } = useNuxtApp() /!\ EDIT: Do not use this workaround if you plan to migrate to Nuxt3 : |
I believe this issue has been resolved at #130. |
Environment
Darwin
v16.17.0
2.16.0-27616340.013f051b
0.4.24
yarn@1.22.19
webpack
server
,head
,css
,env
,plugins
,components
,modules
,apollo
,feed
,build
,alias
,transpileDependencies
,i18n
,sitemap
,auth
,typescript
,serverHandlers
,devServerHandlers
,bridge
,buildModules
@nuxtjs/axios@5.13.6
,@nuxtjs/auth@4.9.1
,@nuxtjs/apollo@4.0.1-rc.5
,@nuxtjs/feed@2.0.0
,@nuxtjs/sitemap@2.4.0
,@nuxtjs/i18n@7.3.0
,nuxt-rollbar-module@1.1.0
()
,@nuxt/bridge@3.0.0-27700335.6dfc006
Reproduction
const { $auth } = useNuxtApp()
givesany
type, whereasnuxt2Context.$auth
fromconst { nuxt2Context } = useNuxtApp()
is typed correctly.Describe the bug
Lack of typing
Additional context
Perhaps related to #130
Logs
No response
The text was updated successfully, but these errors were encountered: