File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed
packages/webchannel-wrapper/src Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -143,3 +143,18 @@ export class Md5 {
143
143
digest ( ) : Array < number > ;
144
144
update ( bytes : Array < number > | Uint8Array | string , opt_length ?: number ) : void ;
145
145
}
146
+
147
+ // See https://google.github.io/closure-library/api/goog.math.Integer.html
148
+ // Unit test are written in
149
+ // packages/firestore/test/unit/core/webchannel_wrapper.test.ts
150
+ export class Integer {
151
+ constructor ( bits : Array < number > , sign : number ) ;
152
+ add ( other : Integer ) : Integer ;
153
+ multiply ( other : Integer ) : Integer ;
154
+ modulo ( other : Integer ) : Integer ;
155
+ compare ( other : Integer ) : number ;
156
+ toNumber ( ) : number ;
157
+ toString ( opt_radix ?: number ) : string ;
158
+ static fromNumber ( value : number ) : Integer ;
159
+ static fromString ( str : string , opt_radix ?: number ) : Integer ;
160
+ }
Original file line number Diff line number Diff line change @@ -83,6 +83,16 @@ goog.crypt.Md5.prototype['digest'] = goog.crypt.Md5.prototype.digest;
83
83
goog . crypt . Md5 . prototype [ 'reset' ] = goog . crypt . Md5 . prototype . reset ;
84
84
goog . crypt . Md5 . prototype [ 'update' ] = goog . crypt . Md5 . prototype . update ;
85
85
86
+ goog . require ( 'goog.math.Integer' ) ;
87
+ goog . math . Integer . prototype [ 'add' ] = goog . math . Integer . prototype . add ;
88
+ goog . math . Integer . prototype [ 'multiply' ] = goog . math . Integer . prototype . multiply ;
89
+ goog . math . Integer . prototype [ 'modulo' ] = goog . math . Integer . prototype . modulo ;
90
+ goog . math . Integer . prototype [ 'compare' ] = goog . math . Integer . prototype . compare ;
91
+ goog . math . Integer . prototype [ 'toNumber' ] = goog . math . Integer . prototype . toNumber ;
92
+ goog . math . Integer . prototype [ 'toString' ] = goog . math . Integer . prototype . toString ;
93
+ goog . math . Integer [ 'fromNumber' ] = goog . math . Integer . fromNumber ;
94
+ goog . math . Integer [ 'fromString' ] = goog . math . Integer . fromString ;
95
+
86
96
module [ 'exports' ] [ 'createWebChannelTransport' ] =
87
97
goog . net . createWebChannelTransport ;
88
98
module [ 'exports' ] [ 'getStatEventTarget' ] =
@@ -95,3 +105,4 @@ module['exports']['FetchXmlHttpFactory'] = goog.net.FetchXmlHttpFactory;
95
105
module [ 'exports' ] [ 'WebChannel' ] = goog . net . WebChannel ;
96
106
module [ 'exports' ] [ 'XhrIo' ] = goog . net . XhrIo ;
97
107
module [ 'exports' ] [ 'Md5' ] = goog . crypt . Md5 ;
108
+ module [ 'exports' ] [ 'Integer' ] = goog . math . Integer ;
You can’t perform that action at this time.
0 commit comments