export function wait ( ms ) { return new Promise < void > ( resolve => { setTimeout ( ( ) => { resolve ( ) ; } , ms ) ; } ) ; } export async function waitAsync ( num = 10 ) { return new Promise ( resolve => setImmediate ( resolve ) ) ; }