How do I declare a return type of a tuple of two numbers?
const coordinates = (id: number): [number, number] => [id, id];
No need for the parenthesis around the return tuple type
const coordinates = (id: number) => [id, id] as const;
// const coordinates: (id: number) => [number, number]
From TypeScript 3.4 onwards you can use const assertations.