default.d.ts 257 B

12345678910111213
  1. /**
  2. Delays the promise for the given duration.
  3. @example
  4. ```
  5. import {delay} from 'unicorn-magic';
  6. await delay({seconds: 1});
  7. console.log('1 second later');
  8. ```
  9. */
  10. export function delay(duration: {seconds: number} | {milliseconds: number}): Promise<void>;