@@ -70,7 +70,9 @@ import {
70
70
Target as ProtoTarget ,
71
71
Timestamp as ProtoTimestamp ,
72
72
Value as ProtoValue ,
73
- Write as ProtoWrite
73
+ Write as ProtoWrite ,
74
+ TargetChangeTargetChangeType as ProtoTargetChangeTargetChangeType ,
75
+ WriteResult as ProtoWriteResult
74
76
} from '../protos/firestore_proto_api' ;
75
77
import { debugAssert , fail , hardAssert } from '../util/assert' ;
76
78
import { Code , FirestoreError } from '../util/error' ;
@@ -97,10 +99,6 @@ import {
97
99
WatchTargetChangeState
98
100
} from './watch_change' ;
99
101
import { isNanValue , isNullValue , normalizeTimestamp } from '../model/values' ;
100
- import {
101
- TargetChangeTargetChangeType ,
102
- WriteResult
103
- } from '../protos/firestore_proto_api' ;
104
102
105
103
const DIRECTIONS = ( ( ) => {
106
104
const dirs : { [ dir : string ] : ProtoOrderDirection } = { } ;
@@ -572,7 +570,7 @@ export function fromWatchChange(
572
570
}
573
571
574
572
function fromWatchTargetChangeState (
575
- state : TargetChangeTargetChangeType
573
+ state : ProtoTargetChangeTargetChangeType
576
574
) : WatchTargetChangeState {
577
575
if ( state === 'NO_CHANGE' ) {
578
576
return WatchTargetChangeState . NoChange ;
@@ -716,7 +714,7 @@ function fromPrecondition(precondition: ProtoPrecondition): Precondition {
716
714
}
717
715
718
716
function fromWriteResult (
719
- proto : WriteResult ,
717
+ proto : ProtoWriteResult ,
720
718
commitTime : ProtoTimestamp
721
719
) : MutationResult {
722
720
// NOTE: Deletes don't have an updateTime.
@@ -741,7 +739,7 @@ function fromWriteResult(
741
739
}
742
740
743
741
export function fromWriteResults (
744
- protos : WriteResult [ ] | undefined ,
742
+ protos : ProtoWriteResult [ ] | undefined ,
745
743
commitTime ?: ProtoTimestamp
746
744
) : MutationResult [ ] {
747
745
if ( protos && protos . length > 0 ) {
0 commit comments