@w5s/async
W5S Promise module (@w5s/async)
Installation
npm install @w5s/async
Usage
import { delay } from '@w5s/async';
export async function main() {
await delay(1000); // Wait 1 second
console.log('Hello world!');
}
License
MIT © Julien Polo julien.polo@gmail.com
Index
Other
Awaitable
Type parameters
- T
Type for something that can be used with
await
. It can be eitherT
orPromise<T>
https://stackoverflow.com/a/56129545