Skip to content

Commit

Permalink
annotate caught errors as any
Browse files Browse the repository at this point in the history
  • Loading branch information
dstaley authored and dependabot[bot] committed Oct 11, 2021
1 parent b1189f5 commit c55cd88
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions src/adapters/IDB.ts
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ export default class IDB<
},
{ mode: "readwrite" }
);
} catch (e) {
} catch (e: any) {
this._handleError("clear", e);
}
}
Expand Down Expand Up @@ -564,7 +564,7 @@ export default class IDB<
(record = (e.target as IDBRequest<KintoObject>).result as B);
});
return record!;
} catch (e) {
} catch (e: any) {
this._handleError("get", e);
}
}
Expand Down Expand Up @@ -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);
}

Expand Down Expand Up @@ -626,7 +626,7 @@ export default class IDB<
{ mode: "readwrite" }
);
return value;
} catch (e) {
} catch (e: any) {
this._handleError("saveLastModified", e);
}

Expand All @@ -649,7 +649,7 @@ export default class IDB<
});

return entry ? entry.value : null;
} catch (e) {
} catch (e: any) {
this._handleError("getLastModified", e);
}

Expand Down Expand Up @@ -705,7 +705,7 @@ export default class IDB<
await this.saveLastModified(lastModified);
}
return records;
} catch (e) {
} catch (e: any) {
this._handleError("importBulk", e);
}

Expand All @@ -720,7 +720,7 @@ export default class IDB<
{ mode: "readwrite" }
);
return metadata;
} catch (e) {
} catch (e: any) {
this._handleError("saveMetadata", e);
}
}
Expand All @@ -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);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion test/test_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export async function expectAsyncError<T>(

try {
await fn();
} catch (err) {
} catch (err: any) {
error = err;
}

Expand Down

0 comments on commit c55cd88

Please sign in to comment.