Wait for an amount of time

JavaScript version
const wait = async (milliseconds) => new Promise((resolve) => setTimeout(resolve, milliseconds));
TypeScript version
const wait = async (milliseconds: number) => new Promise((resolve) => setTimeout(resolve, milliseconds));