@afoot/sorted-array / Exports
Ƭ DataItem: number | string | DataObject | unknown[]
Base units of info that can be added to a sorted array.
index.ts:13
Ƭ DataObject: Record<string | number, any>
Any Object Literal.
index.ts:11
Ƭ DataSet: TypeArray<DataItem>
The module payload.
index.ts:8
Ƭ SortCallback: (a: DataItem, b: DataItem) => number
▸ (a, b): number
Sorting algorithm.
| Name | Type | Description |
|---|---|---|
a |
DataItem |
Comparator to sort against. |
b |
DataItem |
Comparator to sort against. |
number
One of [0,1,-1] to determine sort order.
index.ts:20
Ƭ SortedArrayParams: DataSet | SortedArrayConfig
Params passed into new instane.
index.ts:22
Ƭ TypeArray<Type>: Type extends unknown ? Type[] : never
Generates DataSet by iterating over union types of DataItem, applying array type to each.
TypeScript will not allow you to mix types in the array.
| Name |
|---|
Type |
index.ts:6