Skip to content

fix(db): inherit generics in snapshotChanges, stateChanges, auditTrai…#1524

Closed
iNViTiON wants to merge 2 commits intoangular:masterfrom
iNViTiON:my-fix-branch
Closed

fix(db): inherit generics in snapshotChanges, stateChanges, auditTrai…#1524
iNViTiON wants to merge 2 commits intoangular:masterfrom
iNViTiON:my-fix-branch

Conversation

@iNViTiON
Copy link

@iNViTiON iNViTiON commented Mar 23, 2018

…l interface

valueChanges already support it (refer to #1214 ) but this one need change to @firebase
I submit separate PR to @firebase here firebase/firebase-js-sdk#590

Checklist

Description

link to issue #1214 ang PR firebase/firebase-js-sdk#590

Code sample

this.db.list<SampleModel>(`/users/${uid}`).snapshotChanges().subscription(a => {
const b = a[0].payload.val(); // b have SampleModel type
});

…l interface

valueChanges already support it but this one need change to @firebase
I submit separate PR to @firebase
@jamesdaniels
Copy link
Member

Needed more work, superseded by #1644 #1643

@iNViTiON
Copy link
Author

@jamesdaniels look like @firebase willing to support generic type for DataSnapshot. Should we wait for their decision before extend it by ourselve?

@jamesdaniels
Copy link
Member

@iNViTiON I'm fine implementing here as that pull request has been open for some time... paging @jshcrowthe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants