nativescript-plugin-firebase
nativescript-plugin-firebase copied to clipboard
Property 'functions' does not exist on type 'typeof firebase'
Using NS8 with Angular and importing as import { firebase } from "@nativescript/firebase" I get the following error when accessing firebase.functions.httpsCallable():
ERROR in src/app/core/providers/firebase.provider.ts:113:27 - error TS2339: Property 'functions' does not exist on type 'typeof firebase'.
If I inspect the firebase object the functions property in fact does exist. Am I doing something wrong with the import or is this a bug?
Borrowing from #1673 adding the import below and then directly accessing functions works, but seems like it would be preferable to fix the types so the second import is not needed.
import { firebase } from "@nativescript/firebase";
import { firebaseFunctions as functions } from "@nativescript/firebase/functions"
I solved this issue just importing firebase like this:
import * as firebase from "@nativescript/firebase";