function discordSort

export function discordSort<Key, Value extends { rawPosition: number; id: Snowflake }>( collection: Collection<Key, Value>,): Collection<Key, Value>;

Sorts by Discord's position and id.

Type Parameters

Key

Value extends { rawPosition: number; id: Snowflake }

Parameters

collection: Collection<Key, Value>
Collection of objects to sort