Skip to content

Commit

Permalink
let result type of sort be inferred
Browse files Browse the repository at this point in the history
  • Loading branch information
giacomociti committed Jun 11, 2024
1 parent da5d822 commit 1f75849
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sorting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export const defaultOptions = <T>() => ({
maxFiles: undefined
})

export async function * sort<T> (iterable: Iterable<T>, options?: Options<T>) : AsyncGenerator<T> {
export async function * sort<T> (iterable: Iterable<T>, options?: Options<T>) {
const { maxSize, maxFiles, comparer, store } = options?? defaultOptions<T>()
try {
const sortedChunks = getSortedChunks(iterable, { maxSize, comparer, store })
Expand Down

0 comments on commit 1f75849

Please sign in to comment.