市场夺宝奇兵
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
257 B

  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>;