Summary
Reviewing the modular product guides under docs/, I found that the copy-paste code samples in several of them do not compile or parse as written. A developer following a guide hits a TypeScript or syntax error before anything reaches Firebase.
Affected guides and problems
- App Check, Auth, Database, Functions, Messaging, Remote Config, Storage, Performance (
app.config.ts sample): the appConfig object literal closes with }) instead of }, a syntax error.
- All of the above, plus Firestore: the sample annotates
appConfig: ApplicationConfig but never imports ApplicationConfig from @angular/core.
- App Check: the sample calls
getApp() without importing it.
- Firestore:
export Interface UserProfile should be export interface (it appears twice), Observable is used without an rxjs import, and CollectionReference and DocumentReference are used without imports.
- Auth, Database: the emulator and multiple-instance samples still wrap providers in
@NgModule and read environment.firebase, which the standalone app.config.ts setup these guides otherwise teach no longer uses.
- Messaging: the
FcmService example does not compile (an await inside a non-async method, an assignment placed outside the constructor, an undeclared field), and the service-worker sample pins the Firebase CDN to 9.22.0 while the library depends on firebase ^12.4.0.
Part of the messaging problem was reported earlier in #3369.
Scope
Documentation only. A pull request follows.
Summary
Reviewing the modular product guides under
docs/, I found that the copy-paste code samples in several of them do not compile or parse as written. A developer following a guide hits a TypeScript or syntax error before anything reaches Firebase.Affected guides and problems
app.config.tssample): theappConfigobject literal closes with})instead of}, a syntax error.appConfig: ApplicationConfigbut never importsApplicationConfigfrom@angular/core.getApp()without importing it.export Interface UserProfileshould beexport interface(it appears twice),Observableis used without an rxjs import, andCollectionReferenceandDocumentReferenceare used without imports.@NgModuleand readenvironment.firebase, which the standaloneapp.config.tssetup these guides otherwise teach no longer uses.FcmServiceexample does not compile (anawaitinside a non-async method, an assignment placed outside the constructor, an undeclared field), and the service-worker sample pins the Firebase CDN to 9.22.0 while the library depends on firebase^12.4.0.Part of the messaging problem was reported earlier in #3369.
Scope
Documentation only. A pull request follows.