Open
Description
[REQUIRED] Describe your environment
- Operating System version: N/A
- Browser version: N/A
- Firebase SDK version: 8.2.8
- Firebase Product: firebase-js-sdk
[REQUIRED] Describe the problem
The externs available at firebase-js-sdk/packages/firebase/externs/ are currently incomplete and incorrect which causes issues when using the Closure Compiler.
Products that are missing externs:
- Analytics
- Performance
- RemoteConfig
The externs for Firestore are missing definitions for the withConverter()
method.
I think the get()
method for firebase.firestore.Query
should return a Promise
to reflect the extern's comments and the documentation for this method:
/**
* Executes the query and returns the results as a `QuerySnapshot`.
*
* @param {!firebase.firestore.GetOptions=} options An options object to
* configure how the data is retrieved.
*
* @return {!firebase.firestore.QuerySnapshot}
* A promise that will be resolved with the results of the query.
*/
firebase.firestore.Query.prototype.get = function (options) {};
would become:
/**
* Executes the query and returns the results as a `QuerySnapshot`.
*
* @param {!firebase.firestore.GetOptions=} options An options object to
* configure how the data is retrieved.
*
* @return {!Promise<!firebase.firestore.QuerySnapshot>}
* A promise that will be resolved with the results of the query.
*/
firebase.firestore.Query.prototype.get = function (options) {};
The externs also produce several warnings when using --jscomp_warning=lintChecks
due to use of var
over let
or const
.