File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -399,7 +399,7 @@ export declare namespace firestoreV1ApiClientInterfaces {
399399 readTime ?: Timestamp ;
400400 targetId ?: number ;
401401 once ?: boolean ;
402- expectedCount ?: number ;
402+ expectedCount ?: number | { value : number } ;
403403 }
404404 interface TargetChange {
405405 targetChangeType ?: TargetChangeTargetChangeType ;
Original file line number Diff line number Diff line change @@ -1051,7 +1051,10 @@ export function toTarget(
10511051
10521052 if ( targetData . resumeToken . approximateByteSize ( ) > 0 ) {
10531053 result . resumeToken = toBytes ( serializer , targetData . resumeToken ) ;
1054- result . expectedCount = targetData . expectedCount ?? undefined ;
1054+ const expectedCount = toInt32Proto ( serializer , targetData . expectedCount ) ;
1055+ if ( expectedCount !== null ) {
1056+ result . expectedCount = expectedCount ;
1057+ }
10551058 } else if ( targetData . snapshotVersion . compareTo ( SnapshotVersion . min ( ) ) > 0 ) {
10561059 // TODO(wuandy): Consider removing above check because it is most likely true.
10571060 // Right now, many tests depend on this behaviour though (leaving min() out
@@ -1060,7 +1063,10 @@ export function toTarget(
10601063 serializer ,
10611064 targetData . snapshotVersion . toTimestamp ( )
10621065 ) ;
1063- result . expectedCount = targetData . expectedCount ?? undefined ;
1066+ const expectedCount = toInt32Proto ( serializer , targetData . expectedCount ) ;
1067+ if ( expectedCount !== null ) {
1068+ result . expectedCount = expectedCount ;
1069+ }
10641070 }
10651071
10661072 return result ;
You can’t perform that action at this time.
0 commit comments