BREAKING CHANGE: `$nuxt` usage in stores defaults to type `any` unless
you install the `@nuxt/types` package. This is because that package is
quite heavy and can cause conflicts in projects not requiring it. Note
`$nuxt` is deprecated and shouldn't be used (cf the other breaking
changes notes).
declare module 'pinia' {
export interface PiniaCustomProperties {
/**
- * Nuxt context.
+ * Nuxt context. Requires you to install `@nuxt/types` to have types.
*
* @deprecated use `useNuxtApp()` and global `$fetch()` instead. See
* https://v3.nuxtjs.org/bridge/bridge-composition-api/
*/
- $nuxt: import('@nuxt/schema').NuxtApp
+ // @ts-ignore: heavy types, must be added by the user
+ $nuxt: import('@nuxt/types').Context
}
}