File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -12,17 +12,35 @@ export type CollectionHook = {
12
12
loading: boolean,
13
13
value?: QuerySnapshot,
14
14
};
15
+ export type CollectionDataHook<T> = {
16
+ error?: Object,
17
+ loading: boolean,
18
+ value?: T,
19
+ };
15
20
export type DocumentHook = {
16
21
error?: Object,
17
22
loading: boolean,
18
23
value?: DocumentSnapshot,
19
24
};
25
+ export type DocumentDataHook<T> = {
26
+ error?: Object,
27
+ loading: boolean,
28
+ value?: T,
29
+ };
20
30
21
31
declare export function useCollection(
22
32
query?: Query | null,
23
33
options?: SnapshotListenOptions
24
34
): CollectionHook;
35
+ declare export function useCollectionData(
36
+ query?: Query | null,
37
+ idField?: string
38
+ ): CollectionDataHook;
25
39
declare export function useDocument(
26
40
ref?: DocumentReference | null,
27
41
options?: SnapshotListenOptions
28
42
): DocumentHook;
43
+ declare export function useDocumentData(
44
+ ref?: DocumentReference | null,
45
+ idField?: string
46
+ ): DocumentHook;
You can’t perform that action at this time.
0 commit comments