Skip to content

Cannot import type?? import { DocumentData } from "firebase/firestore"; #8273

Closed
@ChurikiTenna

Description

@ChurikiTenna

Operating System

Mac

Browser Version

Safari

Firebase SDK Version

9.15.0

Firebase SDK Product:

Firestore

Describe your project's tooling

Nuxt3 with vues

Describe the problem

When I try to get DocumentData type like this in due file,

<script setup lang="ts">
import { DocumentData } from "firebase/firestore";

These seem to not produce any errors:
import { DocumentData } from "@firebase/firestore-types";
import type { DocumentData } from "firebase/firestore/lite";
Though it fails on localhost page.

スクリーンショット 2024-05-30 20 19 53

It fails with Module '"firebase/firestore"' has no exported member 'DocumentData'.ts(2305).

Where can I import DocumentData from??

Steps and code to reproduce issue

install firebase v9 modules, then try to impoty DocumentData as below:

import { DocumentData } from "firebase/firestore";

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions