Files

14 lines
257 B
TypeScript
Raw Permalink Normal View History

2026-03-22 03:21:45 +02:00
/**
Delays the promise for the given duration.
@example
```
import {delay} from 'unicorn-magic';
await delay({seconds: 1});
console.log('1 second later');
```
*/
export function delay(duration: {seconds: number} | {milliseconds: number}): Promise<void>;