Repository navigation
docs(database): fix objectVal/listVal docs and multiple instances example - #3857
Open
AdamBoczula wants to merge 1 commit into
Open
AdamBoczula wants to merge 1 commit into
AdamBoczula wants to merge 1 commit into
Conversation
…mple - Swap the reversed descriptions of objectVal() and listVal(), and fix listVal() return type (Observable<T[]>) and parameter name (query) - Update Reference to DatabaseReference in the convenience observable tables - Fix options:? typo in the stateChanges table - Use inject(FirebaseApp) in provideDatabase() in the Working with multiple instances example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
yarn install,yarn testrun successfully? not run (Markdown only)Description
Fixes several inaccuracies in
docs/database.md:objectVal()andlistVal()descriptions:objectVal()emits the value of a single node (Observable<T>), whilelistVal()emits an array of child values (Observable<T[]>). Also fixeslistVal()'s parameter name (ref->query) and return type (Observable<T | null>->Observable<T[]>).Referencetype withDatabaseReferencein the convenience observable tables (object,objectVal,list,listVal,stateChanges,auditTrail,fromRef), and aligns the Markdown tables.options:?->options?:in thestateChangestable.provideDatabase((app: FirebaseApp) => getDatabase(app, ...))toprovideDatabase(() => getDatabase(inject(FirebaseApp), ...)), sinceprovideDatabasetakes(injector: Injector) => FirebaseDatabaserather thanFirebaseApp.Verification
Checked directly against the source signatures:
src/database/database.module.ts:provideDatabase(fn: (injector: Injector) => FirebaseDatabase, ...deps: any[])src/database/firebase.ts/firebase/database:DatabaseReferenceextendsQueryrxfire(database/object/index.tsanddatabase/list/index.ts):objectVal<T>(query: Query, options?: { keyField?: string }): Observable<T>andlistVal<T>(query: Query, options?: { keyField?: string }): Observable<T[]>