Skip to content

Commit

Permalink
fix: fix options type
Browse files Browse the repository at this point in the history
  • Loading branch information
radekBednarik committed Nov 1, 2024
1 parent 042d4e8 commit 2227e5a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bedna/czech-covid-data-api-lib",
"version": "1.4.0",
"version": "1.4.1",
"exports": "./src/index.ts",
"license": "MIT",
"tasks": {
Expand Down
8 changes: 4 additions & 4 deletions src/helpers/sequential.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ export default class Sequential {
{ page, itemsPerPage }: { page?: number; itemsPerPage?: number },
) => Promise<[T, null] | [null, GetApiError]>,
options: {
pages: { start?: number; end?: number };
pages?: { start?: number; end?: number };
itemsPerPage?: number;
waitAfterCall?: number;
},
} = {},
): Promise<Array<[T, null] | [null, GetApiError]>> {
const data: Array<[T, null] | [null, GetApiError]> = [];

const startPage = options.pages.start || 1;
const endPage = options.pages.end || Infinity;
const startPage = options.pages?.start || 1;
const endPage = options.pages?.end || Infinity;

for (let page = startPage; page <= endPage; page++) {
const result = await handler({
Expand Down

0 comments on commit 2227e5a

Please sign in to comment.