@@ -24,7 +24,7 @@ describe('Storage', function () {
2424 // @ts -ignore the type is incorrect *on purpose* to test type checking in javascript
2525 await firebase . firestore ( ) . settings ( 'foo' ) ;
2626 return Promise . reject ( new Error ( 'Did not throw an Error.' ) ) ;
27- } catch ( e ) {
27+ } catch ( e : any ) {
2828 return expect ( e . message ) . toContain ( "'settings' must be an object" ) ;
2929 }
3030 } ) ;
@@ -34,7 +34,7 @@ describe('Storage', function () {
3434 // @ts -ignore the type is incorrect *on purpose* to test type checking in javascript
3535 await firebase . firestore ( ) . settings ( { foo : 'bar' } ) ;
3636 return Promise . reject ( new Error ( 'Did not throw an Error.' ) ) ;
37- } catch ( e ) {
37+ } catch ( e : any ) {
3838 return expect ( e . message ) . toContain ( "'settings.foo' is not a valid settings field" ) ;
3939 }
4040 } ) ;
@@ -44,7 +44,7 @@ describe('Storage', function () {
4444 // @ts -ignore the type is incorrect *on purpose* to test type checking in javascript
4545 await firebase . firestore ( ) . settings ( { cacheSizeBytes : 'foo' } ) ;
4646 return Promise . reject ( new Error ( 'Did not throw an Error.' ) ) ;
47- } catch ( e ) {
47+ } catch ( e : any ) {
4848 return expect ( e . message ) . toContain ( "'settings.cacheSizeBytes' must be a number value" ) ;
4949 }
5050 } ) ;
@@ -53,7 +53,7 @@ describe('Storage', function () {
5353 try {
5454 await firebase . firestore ( ) . settings ( { cacheSizeBytes : 123 } ) ;
5555 return Promise . reject ( new Error ( 'Did not throw an Error.' ) ) ;
56- } catch ( e ) {
56+ } catch ( e : any ) {
5757 return expect ( e . message ) . toContain ( "'settings.cacheSizeBytes' the minimum cache size" ) ;
5858 }
5959 } ) ;
@@ -69,7 +69,7 @@ describe('Storage', function () {
6969 // @ts -ignore the type is incorrect *on purpose* to test type checking in javascript
7070 await firebase . firestore ( ) . settings ( { host : 123 } ) ;
7171 return Promise . reject ( new Error ( 'Did not throw an Error.' ) ) ;
72- } catch ( e ) {
72+ } catch ( e : any ) {
7373 return expect ( e . message ) . toContain ( "'settings.host' must be a string value" ) ;
7474 }
7575 } ) ;
@@ -78,7 +78,7 @@ describe('Storage', function () {
7878 try {
7979 await firebase . firestore ( ) . settings ( { host : '' } ) ;
8080 return Promise . reject ( new Error ( 'Did not throw an Error.' ) ) ;
81- } catch ( e ) {
81+ } catch ( e : any ) {
8282 return expect ( e . message ) . toContain ( "'settings.host' must not be an empty string" ) ;
8383 }
8484 } ) ;
@@ -88,7 +88,7 @@ describe('Storage', function () {
8888 // @ts -ignore the type is incorrect *on purpose* to test type checking in javascript
8989 await firebase . firestore ( ) . settings ( { persistence : 'true' } ) ;
9090 return Promise . reject ( new Error ( 'Did not throw an Error.' ) ) ;
91- } catch ( e ) {
91+ } catch ( e : any ) {
9292 return expect ( e . message ) . toContain ( "'settings.persistence' must be a boolean value" ) ;
9393 }
9494 } ) ;
@@ -98,7 +98,7 @@ describe('Storage', function () {
9898 // @ts -ignore the type is incorrect *on purpose* to test type checking in javascript
9999 await firebase . firestore ( ) . settings ( { ssl : 'true' } ) ;
100100 return Promise . reject ( new Error ( 'Did not throw an Error.' ) ) ;
101- } catch ( e ) {
101+ } catch ( e : any ) {
102102 return expect ( e . message ) . toContain ( "'settings.ssl' must be a boolean value" ) ;
103103 }
104104 } ) ;
@@ -108,7 +108,7 @@ describe('Storage', function () {
108108 // @ts -ignore the type is incorrect *on purpose* to test type checking in javascript
109109 await firestore ( ) . settings ( { ignoreUndefinedProperties : 'bogus' } ) ;
110110 return Promise . reject ( new Error ( 'Should throw' ) ) ;
111- } catch ( e ) {
111+ } catch ( e : any ) {
112112 return expect ( e . message ) . toContain ( "ignoreUndefinedProperties' must be a boolean value." ) ;
113113 }
114114 } ) ;
@@ -118,7 +118,7 @@ describe('Storage', function () {
118118 // @ts -ignore the type is incorrect *on purpose* to test type checking in javascript
119119 await firestore ( ) . settings ( { serverTimestampBehavior : 'bogus' } ) ;
120120 return Promise . reject ( new Error ( 'Should throw' ) ) ;
121- } catch ( e ) {
121+ } catch ( e : any ) {
122122 return expect ( e . message ) . toContain (
123123 "serverTimestampBehavior' must be one of 'estimate', 'previous', 'none'" ,
124124 ) ;
@@ -132,7 +132,7 @@ describe('Storage', function () {
132132 // @ts -ignore the type is incorrect *on purpose* to test type checking in javascript
133133 await firebase . firestore ( ) . runTransaction ( 'foo' ) ;
134134 return Promise . reject ( new Error ( 'Did not throw an Error.' ) ) ;
135- } catch ( e ) {
135+ } catch ( e : any ) {
136136 return expect ( e . message ) . toContain ( "'updateFunction' must be a function" ) ;
137137 }
138138 } ) ;
@@ -149,7 +149,7 @@ describe('Storage', function () {
149149 // @ts -ignore the type is incorrect *on purpose* to test type checking in javascript
150150 firebase . firestore ( ) . collectionGroup ( 123 ) ;
151151 return Promise . reject ( new Error ( 'Did not throw an Error.' ) ) ;
152- } catch ( e ) {
152+ } catch ( e : any ) {
153153 return expect ( e . message ) . toContain ( "'collectionId' must be a string value" ) ;
154154 }
155155 } ) ;
@@ -158,7 +158,7 @@ describe('Storage', function () {
158158 try {
159159 firebase . firestore ( ) . collectionGroup ( '' ) ;
160160 return Promise . reject ( new Error ( 'Did not throw an Error.' ) ) ;
161- } catch ( e ) {
161+ } catch ( e : any ) {
162162 return expect ( e . message ) . toContain ( "'collectionId' must be a non-empty string" ) ;
163163 }
164164 } ) ;
@@ -167,7 +167,7 @@ describe('Storage', function () {
167167 try {
168168 firebase . firestore ( ) . collectionGroup ( `someCollection/bar` ) ;
169169 return Promise . reject ( new Error ( 'Did not throw an Error.' ) ) ;
170- } catch ( e ) {
170+ } catch ( e : any ) {
171171 return expect ( e . message ) . toContain ( "'collectionId' must not contain '/'" ) ;
172172 }
173173 } ) ;
@@ -179,7 +179,7 @@ describe('Storage', function () {
179179 // @ts -ignore the type is incorrect *on purpose* to test type checking in javascript
180180 firebase . firestore ( ) . collection ( 123 ) ;
181181 return Promise . reject ( new Error ( 'Did not throw an Error.' ) ) ;
182- } catch ( e ) {
182+ } catch ( e : any ) {
183183 return expect ( e . message ) . toContain ( "'collectionPath' must be a string value" ) ;
184184 }
185185 } ) ;
@@ -188,7 +188,7 @@ describe('Storage', function () {
188188 try {
189189 firebase . firestore ( ) . collection ( '' ) ;
190190 return Promise . reject ( new Error ( 'Did not throw an Error.' ) ) ;
191- } catch ( e ) {
191+ } catch ( e : any ) {
192192 return expect ( e . message ) . toContain ( "'collectionPath' must be a non-empty string" ) ;
193193 }
194194 } ) ;
@@ -197,7 +197,7 @@ describe('Storage', function () {
197197 try {
198198 firebase . firestore ( ) . collection ( `firestore/bar` ) ;
199199 return Promise . reject ( new Error ( 'Did not throw an Error.' ) ) ;
200- } catch ( e ) {
200+ } catch ( e : any ) {
201201 return expect ( e . message ) . toContain ( "'collectionPath' must point to a collection" ) ;
202202 }
203203 } ) ;
@@ -215,7 +215,7 @@ describe('Storage', function () {
215215 // @ts -ignore the type is incorrect *on purpose* to test type checking in javascript
216216 firebase . firestore ( ) . doc ( 123 ) ;
217217 return Promise . reject ( new Error ( 'Did not throw an Error.' ) ) ;
218- } catch ( e ) {
218+ } catch ( e : any ) {
219219 return expect ( e . message ) . toContain ( "'documentPath' must be a string value" ) ;
220220 }
221221 } ) ;
@@ -224,7 +224,7 @@ describe('Storage', function () {
224224 try {
225225 firebase . firestore ( ) . doc ( '' ) ;
226226 return Promise . reject ( new Error ( 'Did not throw an Error.' ) ) ;
227- } catch ( e ) {
227+ } catch ( e : any ) {
228228 return expect ( e . message ) . toContain ( "'documentPath' must be a non-empty string" ) ;
229229 }
230230 } ) ;
@@ -233,7 +233,7 @@ describe('Storage', function () {
233233 try {
234234 firebase . firestore ( ) . doc ( `${ COLLECTION } /bar/baz` ) ;
235235 return Promise . reject ( new Error ( 'Did not throw an Error.' ) ) ;
236- } catch ( e ) {
236+ } catch ( e : any ) {
237237 return expect ( e . message ) . toContain ( "'documentPath' must point to a document" ) ;
238238 }
239239 } ) ;
@@ -254,7 +254,7 @@ describe('Storage', function () {
254254 } ) ;
255255
256256 return Promise . reject ( new Error ( 'Expected set() to throw' ) ) ;
257- } catch ( e ) {
257+ } catch ( e : any ) {
258258 return expect ( e . message ) . toEqual ( 'Unsupported field value: undefined' ) ;
259259 }
260260 } ) ;
@@ -270,7 +270,7 @@ describe('Storage', function () {
270270 } ,
271271 } ) ;
272272 return Promise . reject ( new Error ( 'Expected set() to throw' ) ) ;
273- } catch ( e ) {
273+ } catch ( e : any ) {
274274 return expect ( e . message ) . toEqual ( 'Unsupported field value: undefined' ) ;
275275 }
276276 } ) ;
@@ -283,7 +283,7 @@ describe('Storage', function () {
283283 myArray : [ { name : 'Tim' , location : { state : undefined , country : 'United Kingdom' } } ] ,
284284 } ) ;
285285 return Promise . reject ( new Error ( 'Expected set() to throw' ) ) ;
286- } catch ( e ) {
286+ } catch ( e : any ) {
287287 return expect ( e . message ) . toEqual ( 'Unsupported field value: undefined' ) ;
288288 }
289289 } ) ;
0 commit comments