File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 1- import firebase from 'firebase/app' ;
1+ import {
2+ DocumentData ,
3+ DocumentSnapshot ,
4+ SnapshotOptions ,
5+ } from 'firebase/firestore' ;
26
3- export const snapshotToData = < T = firebase . firestore . DocumentData > (
4- snapshot : firebase . firestore . DocumentSnapshot ,
5- snapshotOptions ?: firebase . firestore . SnapshotOptions ,
7+ export const snapshotToData = < T = DocumentData > (
8+ snapshot : DocumentSnapshot ,
9+ snapshotOptions ?: SnapshotOptions ,
610 idField ?: string ,
711 refField ?: string ,
812 transform ?: ( val : any ) => T
@@ -11,7 +15,7 @@ export const snapshotToData = <T = firebase.firestore.DocumentData>(
1115 return undefined ;
1216 }
1317
14- let data = snapshot . data ( snapshotOptions ) as firebase . firestore . DocumentData ;
18+ let data = snapshot . data ( snapshotOptions ) as DocumentData ;
1519 if ( transform ) {
1620 data = transform ( data ) ;
1721 }
You can’t perform that action at this time.
0 commit comments