diff --git a/packages/firestore/src/lite-api/reference.ts b/packages/firestore/src/lite-api/reference.ts index b688a464605..89836065c99 100644 --- a/packages/firestore/src/lite-api/reference.ts +++ b/packages/firestore/src/lite-api/reference.ts @@ -252,7 +252,10 @@ export class DocumentReference< * @param converter - Converts objects to and from Firestore. * @returns A `DocumentReference` that uses the provided converter. */ - withConverter( + withConverter< + NewAppModelType, + NewDbModelType extends DocumentData = DocumentData + >( converter: FirestoreDataConverter ): DocumentReference; /** @@ -263,7 +266,10 @@ export class DocumentReference< * use a converter. */ withConverter(converter: null): DocumentReference; - withConverter( + withConverter< + NewAppModelType, + NewDbModelType extends DocumentData = DocumentData + >( converter: FirestoreDataConverter | null ): DocumentReference { return new DocumentReference( @@ -334,7 +340,10 @@ export class CollectionReference< * @param converter - Converts objects to and from Firestore. * @returns A `CollectionReference` that uses the provided converter. */ - withConverter( + withConverter< + NewAppModelType, + NewDbModelType extends DocumentData = DocumentData + >( converter: FirestoreDataConverter ): CollectionReference; /** @@ -347,7 +356,10 @@ export class CollectionReference< withConverter( converter: null ): CollectionReference; - withConverter( + withConverter< + NewAppModelType, + NewDbModelType extends DocumentData = DocumentData + >( converter: FirestoreDataConverter | null ): CollectionReference { return new CollectionReference(