TypeScript - use correct version of setTimeout (node vs window) TypeScript - use correct version of setTimeout (node vs window) typescript typescript