function discordSort

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

Sorts by Discord's position and id.

Type Parameters

Key

Value extends { rawPosition: number; id: Snowflake }

Parameters

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