Skip to content
On this page

Usage with Typescript

The module comes with types by providing a declaration file (index.d.ts) within the npm package.

All you need to do is to include "@nuxtjs/firebase" in your tsconfig.json types like so:

jsonc
// tsconfig.json
{
  "compilerOptions": {
    "types": [
      "node",
      "@nuxt/types",
      // ...
      "@nuxtjs/firebase"
    ]
  }
}

Don't forget to restart your IDE (e.g. VSCODE) after adding the types.

nuxt-fire-demo shows working examples of nuxt-fire with Typescript.