I am using firebase cloud functions with javascript on cloud functions. And, I want to switch from javascript to typescript.
However I cannot use firebase-admin on typescript as following command failed.
command: npm install @types/firebase-admin --save-dev
error: '@types/firebase-admin' is not in the npm registry.
According to this release note, it looks that firebase admin support typescript. Can somebody tell us how to use typescript with firebase-admin on cloud functions?
https://firebase.google.com/support/release-notes/admin/node#4.1.3
const db = firebase.firestore()
? I can't seem to find a typescript type that works for it anywhere, I've triedfirebase.FirebaseFirestore
and many other things to no avail. – Dawes