discordSort

export function discordSort<K, V extends { rawPosition: number; id: Snowflake }>(
collection: Collection<K, V>,
): Collection<K, V>;
export function discordSort<K, V extends { rawPosition: number; id: Snowflake }>(
collection: Collection<K, V>,
): Collection<K, V>;
Sorts by Discord's position and id.
NameConstraintsOptionalDefaultDescription
KNoNone
V{ rawPosition: number; id: Snowflake }NoNone
NameTypeOptionalDescription
collectionCollection<K, V>NoCollection of objects to sort