@@ -731,7 +731,8 @@ export function parseQueryValue(
731731 */
732732export function parseData (
733733 input : unknown ,
734- context : ParseContextImpl
734+ context : ParseContextImpl ,
735+ options ?: { preferIntegers : boolean }
735736) : ProtoValue | null {
736737 // Unwrap the API type from the Compat SDK. This will return the API type
737738 // from firestore-exp.
@@ -779,7 +780,7 @@ export function parseData(
779780 }
780781 return parseArray ( input as unknown [ ] , context ) ;
781782 } else {
782- return parseScalarValue ( input , context ) ;
783+ return parseScalarValue ( input , context , options ) ;
783784 }
784785 }
785786}
@@ -860,14 +861,15 @@ function parseSentinelFieldValue(
860861 */
861862export function parseScalarValue (
862863 value : unknown ,
863- context : ParseContextImpl
864+ context : ParseContextImpl ,
865+ options ?: { preferIntegers : boolean }
864866) : ProtoValue | null {
865867 value = getModularInstance ( value ) ;
866868
867869 if ( value === null ) {
868870 return { nullValue : 'NULL_VALUE' } ;
869871 } else if ( typeof value === 'number' ) {
870- return toNumber ( context . serializer , value ) ;
872+ return toNumber ( context . serializer , value , options ) ;
871873 } else if ( typeof value === 'boolean' ) {
872874 return { booleanValue : value } ;
873875 } else if ( typeof value === 'string' ) {
0 commit comments