UNPKG

es7-typescript-starter

Version:

An es7/typescript starter for building javascript libraries

21 lines (20 loc) 528 B
/** * A sample async function (to demo Typescript's es7 async/await downleveling). * * ### Example (es imports) * ```js * import { asyncABC } from 'es7-typescript-starter' * console.log(await asyncABC()) * // => ['a','b','c'] * ``` * * ### Example (commonjs) * ```js * var double = require('es7-typescript-starter').asyncABC; * asyncABC().then(console.log); * // => ['a','b','c'] * ``` * * @returns a Promise which should contain `['a','b','c']` */ export declare function asyncABC(): Promise<string[]>;