@@ -830,7 +830,7 @@ export class DocumentReference<T = PublicDocumentData>
830
830
try {
831
831
return setDoc ( this . _delegate , value , options ) ;
832
832
} catch ( e ) {
833
- throw rewriteError ( e , 'setDoc' , 'DocumentReference.set' ) ;
833
+ throw replaceFunctionName ( e , 'setDoc' , 'DocumentReference.set' ) ;
834
834
}
835
835
}
836
836
@@ -857,7 +857,7 @@ export class DocumentReference<T = PublicDocumentData>
857
857
) ;
858
858
}
859
859
} catch ( e ) {
860
- throw rewriteError ( e , 'updateDoc' , 'DocumentReference.update' ) ;
860
+ throw replaceFunctionName ( e , 'updateDoc' , 'DocumentReference.update' ) ;
861
861
}
862
862
}
863
863
@@ -938,7 +938,7 @@ export class DocumentReference<T = PublicDocumentData>
938
938
* Replaces the function name in an error thrown by the firestore-exp API
939
939
* with the function names used in the classic API.
940
940
*/
941
- function rewriteError (
941
+ function replaceFunctionName (
942
942
e : Error ,
943
943
originalFunctionName : string ,
944
944
updatedFunctionName : string
@@ -968,7 +968,8 @@ export function extractSnapshotOptions(
968
968
969
969
/**
970
970
* Creates an observer that can be passed to the firestore-exp SDK. The
971
- * observer converts all observed values into the format expected by the shim.
971
+ * observer converts all observed values into the format expected by the classic
972
+ * SDK.
972
973
*
973
974
* @param args The list of arguments from an `onSnapshot` call.
974
975
* @param wrapper The function that converts the firestore-exp type into the
0 commit comments