UNPKG

sort-es

Version:

Blazing fast, tree-shakeable, type-safe, modern utility library to sort any type of array in less than 1 KB!

16 lines (15 loc) 539 B
import { sortable } from "../types/types"; /** * the sortable for the async values * @param asyncItems the async items * @param sortFn the sortable to apply to the async items * * {@link https://sort-es.netlify.app/by-async sortAsync docs} * @version 1.0.0 */ declare const sortAsync: <T>(asyncItems: Promise<T>[], sortFn: sortable<T>) => Promise<T[]>; export declare class AsyncArray<T> extends Array<Promise<T>> { constructor(items: Promise<T>[]); sortAsync(sortFn: sortable<T>): Promise<T[]>; } export default sortAsync;