Skip to main content

@w5s/async

W5S Promise module (@w5s/async)

NPM Version License

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

Awaitable<T>: T | PromiseLike<T>

Type for something that can be used with await. It can be either T or Promise<T>

@see

Type parameters

  • T
Page Options