a Promise which should contain ['a','b','c']
Multiplies a value by 2. (Also a full example of TypeDoc's functionality.)
import { double } from 'typescript-starter'
console.log(double(4))
// => 8
var double = require('typescript-starter').double;
console.log(double(4))
// => 8
Comment describing the value
parameter.
Comment describing the return type.
Raise the value of the first parameter to the power of the second using the
es7 exponentiation operator (**
).
import { power } from 'typescript-starter'
console.log(power(2,3))
// => 8
var power = require('typescript-starter').power;
console.log(power(2,3))
// => 8
the base to exponentiate
the power to which to raise the base
Generated using TypeDoc
A sample async function (to demo Typescript's es7 async/await down-leveling).
Example (es imports)
import { asyncABC } from 'typescript-starter' console.log(await asyncABC()) // => ['a','b','c']
Example (commonjs)
var double = require('typescript-starter').asyncABC; asyncABC().then(console.log); // => ['a','b','c']