@@ -162,6 +162,7 @@ export function useCollection<
162
162
// explicit generic as unknown to allow arbitrary types like numbers or strings
163
163
R extends CollectionReference < unknown > | Query < unknown >
164
164
> (
165
+ // TODO: add MaybeRef
165
166
collectionRef : R ,
166
167
options ?: UseCollectionOptions
167
168
) : _RefFirestore < _InferReferenceType < R > [ ] >
@@ -202,7 +203,7 @@ export function useDocument<
202
203
// explicit generic as unknown to allow arbitrary types like numbers or strings
203
204
R extends DocumentReference < unknown >
204
205
> (
205
- documentRef : R ,
206
+ documentRef : _MaybeRef < R > ,
206
207
options ?: UseDocumentOptions
207
208
) : _RefFirestore < _InferReferenceType < R > > // this one can't be null or should be specified in the converter
208
209
@@ -215,12 +216,12 @@ export function useDocument<
215
216
* @param options - optional options
216
217
*/
217
218
export function useDocument < T > (
218
- documentRef : DocumentReference ,
219
+ documentRef : _MaybeRef < DocumentReference > ,
219
220
options ?: UseDocumentOptions
220
221
) : _RefFirestore < VueFirestoreDocumentData < T > >
221
222
222
223
export function useDocument < T > (
223
- documentRef : DocumentReference < unknown > ,
224
+ documentRef : _MaybeRef < DocumentReference < unknown > > ,
224
225
options ?: UseDocumentOptions
225
226
) :
226
227
| _RefFirestore < VueFirestoreDocumentData < T > | null >
0 commit comments