Hello future self, here's the TypeScript version for your copy/pasting pleasure:
const delay = (ms: number) => new Promise(_ => setTimeout(_, ms))
and your favorite JS version:
const delay = ms => new Promise(_ => setTimeout(_, ms))
and a Node.js (>= v16) only variant:
import { setTimeout } from "timers/promises"
await setTimeout(3000)