Files
printer-notifications/node_modules/svelte-eslint-parser/lib/utils/index.d.ts
2023-11-13 16:10:04 -05:00

13 lines
557 B
TypeScript

/**
* Add element to a sorted array
*/
export declare function addElementToSortedArray<T>(array: T[], element: T, compare: (a: T, b: T) => number): void;
/**
* Add element to a sorted array
*/
export declare function addElementsToSortedArray<T>(array: T[], elements: T[], compare: (a: T, b: T) => number): void;
/**
* Uses a binary search to determine the highest index at which value should be inserted into array in order to maintain its sort order.
*/
export declare function sortedLastIndex<T>(array: T[], compare: (target: T) => number): number;