File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ import { ReactFireOptions, useObservable } from '..';
1616export function useFirestoreDoc < T = unknown > (
1717 ref : firestore . DocumentReference ,
1818 options ?: ReactFireOptions < T >
19- ) : firestore . DocumentSnapshot | T {
19+ ) : T extends { } ? T : firestore . DocumentSnapshot {
2020 return useObservable (
2121 doc ( ref ) ,
2222 `firestore: ${ ref . path } ` ,
@@ -50,7 +50,7 @@ export function useFirestoreDocData<T = unknown>(
5050export function useFirestoreCollection < T = { [ key : string ] : unknown } > (
5151 query : firestore . Query ,
5252 options ?: ReactFireOptions < T [ ] >
53- ) : firestore . QuerySnapshot | T [ ] {
53+ ) : T extends { } ? T [ ] : firestore . QuerySnapshot {
5454 const queryId = getHashFromFirestoreQuery ( query ) ;
5555
5656 return useObservable (
You can’t perform that action at this time.
0 commit comments