Closed clarkjones closed 4 years ago
Seems the static Https methods are there, but at a different path:
import firebase_functions.lib.providers.Https;
Https.onRequest(...);
It's like this because FirebaseFunctions and Http are converted to classes, and we cannot expose the Http class as a field of FirebaseFunctions
We could typedef Https into the firebase-functions module but I initially opted against this because it can make the resulting externs messy, with multiple ways to access the same class. But I might revisit aliasing this in the future
Ahh ok didn't realize that, I guess it would have to be extern interface for it to work.
Thanks for the quick response though. I'll probably stick with the workaround I stated because Https.onRequest requires me to explicitly return null in the function body since the return type is ts.AnyOf2<Void, Promise<Void>>
normally you can do something like
We should be able to do the same thing using
FirebaseFunctions.https.onRequest(...)
though https does not exist in the extern.A current workaround is to use
FirebaseFunctions.runWith({}).https.onRequest(...)