We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8a6f8a5 commit e033e30Copy full SHA for e033e30
firestore/helpers/index.ts
@@ -1,6 +1,6 @@
1
import firebase from 'firebase/app';
2
3
-export const snapshotToData = <T>(
+export const snapshotToData = <T = firebase.firestore.DocumentData>(
4
snapshot: firebase.firestore.DocumentSnapshot,
5
snapshotOptions?: firebase.firestore.SnapshotOptions,
6
idField?: string,
firestore/useDocument.ts
@@ -114,7 +114,7 @@ const useDocumentDataInternal = <
114
const value = useMemo(
115
() =>
116
(snapshot
117
- ? snapshotToData(
+ ? snapshotToData<T>(
118
snapshot,
119
snapshotOptions,
120
idField,
0 commit comments