Skip to content

Commit

Permalink
Merge pull request #66 from lifeomic/improved-docs
Browse files Browse the repository at this point in the history
fix: add inline docs for ProcessWithOrdering
  • Loading branch information
swain authored Dec 6, 2023
2 parents 2f46b52 + 1030fe2 commit 67bfee7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,18 @@ export const withHealthCheckHandling =
};

export type ProcessWithOrderingParams<T> = {
/**
* The list of items to process.
*/
items: T[];
/**
* A function for determining the "order" of an item. Should return a
* string that will be used to order items lexicographically.
*/
orderBy: (msg: T) => string;
/**
* The limit on the number of items to process concurrently at any time.
*/
concurrency: number;
};

Expand Down

0 comments on commit 67bfee7

Please sign in to comment.