File tree 3 files changed +8
-5
lines changed
3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -189,10 +189,11 @@ export class NumericIncrementFieldValueImpl extends SerializableFieldValue {
189
189
}
190
190
191
191
_toFieldTransform ( context : ParseContext ) : FieldTransform {
192
- return new FieldTransform (
193
- context . path ! ,
192
+ const numericIncrement = new NumericIncrementTransformOperation (
193
+ context . serializer ,
194
194
toNumber ( context . serializer , this . _operand )
195
195
) ;
196
+ return new FieldTransform ( context . path ! , numericIncrement ) ;
196
197
}
197
198
198
199
isEqual ( other : FieldValue ) : boolean {
Original file line number Diff line number Diff line change @@ -89,7 +89,10 @@ export class FieldTransform {
89
89
) { }
90
90
}
91
91
92
- export function fieldTransformEquals ( l : FieldTransform , r : FieldTransform ) {
92
+ export function fieldTransformEquals (
93
+ l : FieldTransform ,
94
+ r : FieldTransform
95
+ ) : boolean {
93
96
return (
94
97
l . field . isEqual ( r . field ) &&
95
98
transformOperationEquals ( l . transform , r . transform )
Original file line number Diff line number Diff line change @@ -29,7 +29,6 @@ import {
29
29
} from './values' ;
30
30
import { serverTimestamp } from './server_timestamps' ;
31
31
import { arrayEquals } from '../util/misc' ;
32
- import instantiate = WebAssembly . instantiate ;
33
32
34
33
/** Represents a transform within a TransformMutation. */
35
34
export interface TransformOperation { }
@@ -209,7 +208,7 @@ export class NumericIncrementTransformOperation implements TransformOperation {
209
208
export function applyNumericIncrementTransform (
210
209
transform : NumericIncrementTransformOperation ,
211
210
previousValue : api . Value | null
212
- ) {
211
+ ) : api . Value {
213
212
// PORTING NOTE: Since JavaScript's integer arithmetic is limited to 53 bit
214
213
// precision and resolves overflows by reducing precision, we do not
215
214
// manually cap overflows at 2^63.
You can’t perform that action at this time.
0 commit comments