Skip to content

Commit e033e30

Browse files
committed
Add some additional type hints
1 parent 8a6f8a5 commit e033e30

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

firestore/helpers/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import firebase from 'firebase/app';
22

3-
export const snapshotToData = <T>(
3+
export const snapshotToData = <T = firebase.firestore.DocumentData>(
44
snapshot: firebase.firestore.DocumentSnapshot,
55
snapshotOptions?: firebase.firestore.SnapshotOptions,
66
idField?: string,

firestore/useDocument.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ const useDocumentDataInternal = <
114114
const value = useMemo(
115115
() =>
116116
(snapshot
117-
? snapshotToData(
117+
? snapshotToData<T>(
118118
snapshot,
119119
snapshotOptions,
120120
idField,

0 commit comments

Comments
 (0)