Skip to content

Lack of context typing with useNuxtApp #539

@thisismydesign

Description

@thisismydesign

Environment

  • Operating System: Darwin
  • Node Version: v16.17.0
  • Nuxt Version: 2.16.0-27616340.013f051b
  • Nitro Version: 0.4.24
  • Package Manager: yarn@1.22.19
  • Builder: webpack
  • User Config: server, head, css, env, plugins, components, modules, apollo, feed, build, alias, transpileDependencies, i18n, sitemap, auth, typescript, serverHandlers, devServerHandlers, bridge, buildModules
  • Runtime Modules: @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
  • Build Modules: (), @nuxt/bridge@3.0.0-27700335.6dfc006

Reproduction

const { $auth } = useNuxtApp() gives any type, whereas nuxt2Context.$auth from const { nuxt2Context } = useNuxtApp() is typed correctly.

Describe the bug

Lack of typing

Additional context

Perhaps related to #130

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtypes

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions