Open GlennKnight opened 3 years ago
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
Hi, thanks for the report! We kinda stopped updating the externs because we thought few people use them. Would you mind sharing how you consume the SDK?
Also it's a manual process to update the externs today, which is tedious and error prone, and as a result they tend to fall out of sync eventually. I wonder if the best way forward for closure support is to have consumers generate externs from typings automatically using tools like https://github.com/angular/tsickle, instead of us bundling them in the package.
Thanks for getting back to me.
Ahhh what a shame, I had suspected that I was the only person still using them but saw a glimmer of hope when I saw the firebase-auth externs where updated a couple of months ago.
My set-up is something like the following:
<body>
<script src="/__/firebase/8.2.10/firebase-app.js"></script>
<script src="/__/firebase/8.2.10/firebase-auth.js"></script>
<script src="/__/firebase/8.2.10/firebase-firestore.js"></script>
<script src="/__/firebase/init.js"></script>
<script src="app.js"></script>
</body>
Where app.js
is a vanilla JavaScript programme that has been run through the Closure Compiler with ADVANCED_OPTIMIZATIONS
. I also include the firebase-externs in my src directory so that the compiler does not rename firebase specific functions and variables.
Converting this to a feature request to gauge how much interest there is in adding back externs.
[REQUIRED] Describe your environment
[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:
The externs for Firestore are missing definitions for the
withConverter()
method.I think the
get()
method forfirebase.firestore.Query
should return aPromise
to reflect the extern's comments and the documentation for this method:would become:
The externs also produce several warnings when using
--jscomp_warning=lintChecks
due to use ofvar
overlet
orconst
.