Skip to content

Commit 2df2f78

Browse files
committed
test: add retry option
1 parent ee180a7 commit 2df2f78

File tree

4 files changed

+402
-359
lines changed

4 files changed

+402
-359
lines changed

src/firestore/index.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ export function useCollection<
162162
// explicit generic as unknown to allow arbitrary types like numbers or strings
163163
R extends CollectionReference<unknown> | Query<unknown>
164164
>(
165+
// TODO: add MaybeRef
165166
collectionRef: R,
166167
options?: UseCollectionOptions
167168
): _RefFirestore<_InferReferenceType<R>[]>
@@ -202,7 +203,7 @@ export function useDocument<
202203
// explicit generic as unknown to allow arbitrary types like numbers or strings
203204
R extends DocumentReference<unknown>
204205
>(
205-
documentRef: R,
206+
documentRef: _MaybeRef<R>,
206207
options?: UseDocumentOptions
207208
): _RefFirestore<_InferReferenceType<R>> // this one can't be null or should be specified in the converter
208209

@@ -215,12 +216,12 @@ export function useDocument<
215216
* @param options - optional options
216217
*/
217218
export function useDocument<T>(
218-
documentRef: DocumentReference,
219+
documentRef: _MaybeRef<DocumentReference>,
219220
options?: UseDocumentOptions
220221
): _RefFirestore<VueFirestoreDocumentData<T>>
221222

222223
export function useDocument<T>(
223-
documentRef: DocumentReference<unknown>,
224+
documentRef: _MaybeRef<DocumentReference<unknown>>,
224225
options?: UseDocumentOptions
225226
):
226227
| _RefFirestore<VueFirestoreDocumentData<T> | null>

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ export { useCollection, useDocument } from './firestore'
77

88
export type {
99
UseCollectionOptions,
10+
UseDocumentOptions,
11+
_RefFirestore,
1012
VueFirestoreDocumentData,
1113
VueFirestoreQueryData,
1214
} from './firestore'

0 commit comments

Comments
 (0)