@thorwallet/xchain-util
Version:
Helper utilities for XChain clients
20 lines (19 loc) • 391 B
TypeScript
/**
* Helper to delay anything within an `async` function
*
* @param ms delay in milliseconds
*
* @example
*
* ```
* const anyAsyncFunc = async () => {
* // do something
* console.log('before delay')
* // wait for 200ms
* await delay(200)
* // and do other things
* console.log('after delay')
* }
* ```
*/
export declare const delay: (ms: number) => Promise<unknown>;