Skip to content

Commit 456fc1f

Browse files
committed
Lint fix
1 parent dfb3e00 commit 456fc1f

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

packages/firestore/src/platform/browser_lite/fetch_connection.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ export class FetchConnection extends RestConnection {
6161
headers,
6262
body: requestJson
6363
});
64-
} catch (err: any) {
64+
} catch (e) {
65+
const err = e as { status: number | undefined; statusText: string };
6566
throw new FirestoreError(
6667
mapCodeFromHttpStatus(err.status),
6768
'Request failed with error: ' + err.statusText

packages/firestore/test/integration/api_internal/transaction.test.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
import { expect } from 'chai';
1919

20+
import { FirestoreError } from '../../../src';
2021
import { DEFAULT_TRANSACTION_OPTIONS } from '../../../src/core/transaction_options';
2122
import { TimerId } from '../../../src/util/async_queue';
2223
import { Deferred } from '../../util/promise';
@@ -155,7 +156,8 @@ apiDescribe(
155156
await transaction.set(docRef, { count: 16 });
156157
});
157158
expect.fail('transaction should fail');
158-
} catch (err: any) {
159+
} catch (e) {
160+
const err = e as FirestoreError;
159161
expect(err).to.exist;
160162
expect(err.code).to.equal('aborted');
161163
}
@@ -194,7 +196,8 @@ apiDescribe(
194196
options
195197
);
196198
expect.fail('transaction should fail');
197-
} catch (err: any) {
199+
} catch (e) {
200+
const err = e as FirestoreError;
198201
expect(err).to.exist;
199202
expect(err.code).to.equal('aborted');
200203
}

0 commit comments

Comments
 (0)