@@ -18,9 +18,9 @@ export type UseDocumentDataResult<AppModelType = DocumentData> = ValueHookResult
1818 * Options to configure the subscription
1919 */
2020export interface UseDocumentDataOptions < AppModelType = DocumentData > {
21- snapshotListenOptions ?: SnapshotListenOptions ;
22- snapshotOptions ?: SnapshotOptions ;
23- initialValue ?: AppModelType ;
21+ snapshotListenOptions ?: SnapshotListenOptions | undefined ;
22+ snapshotOptions ?: SnapshotOptions | undefined ;
23+ initialValue ?: AppModelType | undefined ;
2424}
2525
2626/**
@@ -37,11 +37,11 @@ export interface UseDocumentDataOptions<AppModelType = DocumentData> {
3737 */
3838export function useDocumentData < AppModelType = DocumentData , DbModelType extends DocumentData = DocumentData > (
3939 reference : DocumentReference < AppModelType , DbModelType > | undefined | null ,
40- options ?: UseDocumentDataOptions < AppModelType > ,
40+ options ?: UseDocumentDataOptions < AppModelType > | undefined ,
4141) : UseDocumentDataResult < AppModelType > {
4242 const { snapshotListenOptions, snapshotOptions } = options ?? { } ;
43- const { includeMetadataChanges } = snapshotListenOptions ?? { } ;
44- const { serverTimestamps } = snapshotOptions ?? { } ;
43+ const { includeMetadataChanges = false } = snapshotListenOptions ?? { } ;
44+ const { serverTimestamps = "none" } = snapshotOptions ?? { } ;
4545
4646 const onChange : UseListenOnChange <
4747 AppModelType ,
0 commit comments