diff --git a/src/adapters/IDB.ts b/src/adapters/IDB.ts index 0d6a2eace..84c0a5698 100644 --- a/src/adapters/IDB.ts +++ b/src/adapters/IDB.ts @@ -455,7 +455,7 @@ export default class IDB< }, { mode: "readwrite" } ); - } catch (e) { + } catch (e: any) { this._handleError("clear", e); } } @@ -564,7 +564,7 @@ export default class IDB< (record = (e.target as IDBRequest).result as B); }); return record!; - } catch (e) { + } catch (e: any) { this._handleError("get", e); } } @@ -597,7 +597,7 @@ export default class IDB< // The resulting list of records is sorted. // XXX: with some efforts, this could be fully implemented using IDB API. return params.order ? sortObjects(params.order, results) : results; - } catch (e) { + } catch (e: any) { this._handleError("list", e); } @@ -626,7 +626,7 @@ export default class IDB< { mode: "readwrite" } ); return value; - } catch (e) { + } catch (e: any) { this._handleError("saveLastModified", e); } @@ -649,7 +649,7 @@ export default class IDB< }); return entry ? entry.value : null; - } catch (e) { + } catch (e: any) { this._handleError("getLastModified", e); } @@ -705,7 +705,7 @@ export default class IDB< await this.saveLastModified(lastModified); } return records; - } catch (e) { + } catch (e: any) { this._handleError("importBulk", e); } @@ -720,7 +720,7 @@ export default class IDB< { mode: "readwrite" } ); return metadata; - } catch (e) { + } catch (e: any) { this._handleError("saveMetadata", e); } } @@ -733,7 +733,7 @@ export default class IDB< (entry = (e.target as IDBRequest<{ metadata: any }>).result); }); return entry ? (entry as { metadata: any }).metadata : null; - } catch (e) { + } catch (e: any) { this._handleError("getMetadata", e); } } diff --git a/src/collection.ts b/src/collection.ts index db4ba3008..8a79b8737 100644 --- a/src/collection.ts +++ b/src/collection.ts @@ -951,7 +951,7 @@ export default class Collection< syncResultObject.reset("conflicts").add("resolved", resolved); } } - } catch (err) { + } catch (err: any) { const data: KintoError = { type: "incoming", message: err.message, diff --git a/test/test_utils.ts b/test/test_utils.ts index 5d164fdf0..2924e0101 100644 --- a/test/test_utils.ts +++ b/test/test_utils.ts @@ -41,7 +41,7 @@ export async function expectAsyncError( try { await fn(); - } catch (err) { + } catch (err: any) { error = err; }