Skip to content

Commit

Permalink
fix: add inline docs for ProcessWithOrdering
Browse files Browse the repository at this point in the history
  • Loading branch information
swain committed Dec 6, 2023
1 parent 2f46b52 commit 1030fe2
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 1030fe2

Please sign in to comment.