@@ -473,7 +473,10 @@ export async function syncEngineWrite(
473473 } catch ( e ) {
474474 // If we can't persist the mutation, we reject the user callback and
475475 // don't send the mutation. The user can then retry the write.
476- const error = wrapInUserErrorIfRecoverable ( e , `Failed to persist write` ) ;
476+ const error = wrapInUserErrorIfRecoverable (
477+ e as Error ,
478+ `Failed to persist write`
479+ ) ;
477480 userCallback . reject ( error ) ;
478481 }
479482}
@@ -532,7 +535,7 @@ export async function syncEngineApplyRemoteEvent(
532535 remoteEvent
533536 ) ;
534537 } catch ( error ) {
535- await ignoreIfPrimaryLeaseLoss ( error ) ;
538+ await ignoreIfPrimaryLeaseLoss ( error as FirestoreError ) ;
536539 }
537540}
538541
@@ -684,7 +687,7 @@ export async function syncEngineApplySuccessfulWrite(
684687 ) ;
685688 await syncEngineEmitNewSnapsAndNotifyLocalStore ( syncEngineImpl , changes ) ;
686689 } catch ( error ) {
687- await ignoreIfPrimaryLeaseLoss ( error ) ;
690+ await ignoreIfPrimaryLeaseLoss ( error as FirestoreError ) ;
688691 }
689692}
690693
@@ -715,7 +718,7 @@ export async function syncEngineRejectFailedWrite(
715718 ) ;
716719 await syncEngineEmitNewSnapsAndNotifyLocalStore ( syncEngineImpl , changes ) ;
717720 } catch ( error ) {
718- await ignoreIfPrimaryLeaseLoss ( error ) ;
721+ await ignoreIfPrimaryLeaseLoss ( error as FirestoreError ) ;
719722 }
720723}
721724
@@ -752,7 +755,7 @@ export async function syncEngineRegisterPendingWritesCallback(
752755 syncEngineImpl . pendingWritesCallbacks . set ( highestBatchId , callbacks ) ;
753756 } catch ( e ) {
754757 const firestoreError = wrapInUserErrorIfRecoverable (
755- e ,
758+ e as Error ,
756759 'Initialization of waitForPendingWrites() operation failed'
757760 ) ;
758761 callback . reject ( firestoreError ) ;
@@ -1628,7 +1631,7 @@ async function loadBundleImpl(
16281631 return Promise . resolve ( result . changedCollectionGroups ) ;
16291632 } catch ( e ) {
16301633 logWarn ( LOG_TAG , `Loading bundle failed with ${ e } ` ) ;
1631- task . _failWith ( e ) ;
1634+ task . _failWith ( e as FirestoreError ) ;
16321635 return Promise . resolve ( new Set < string > ( ) ) ;
16331636 }
16341637}
0 commit comments