Closed hamishjohnson closed 3 years ago
You import the firebase namespace from firebase/app then it functions much the same as admin in your backend:
import firebase from 'firebase/app'
someFunc() {
let timestamp: firebase.firestore.Timestamp
}
I'm trying to create helper functions that involve firebase types
Here's an example for my backend and I'd like something similar in nuxt
However, I can't access the type FirebaseFirestore.DocumentReference because FirebaseFirestore is undefined.
I've also tried firebase.firestore.Firestore
my tsconfig types includes "@nuxtjs/firebase"