qos-qweb
Version:
qos js sdk
46 lines • 1.6 kB
JavaScript
/**
* Multiplies a value by 2. (Also a full example of Typedoc's functionality.)
*
* ### Example (es module)
* ```js
* import { double } from 'typescript-starter'
* console.log(double(4))
* // => 8
* ```
*
* ### Example (commonjs)
* ```js
* var double = require('typescript-starter').double;
* console.log(double(4))
* // => 8
* ```
*
* @param value Comment describing the `value` parameter.
* @returns Comment describing the return type.
* @anotherNote Some other value.
*/
export function double(value) {
return value * 2;
}
/**
* Raise the value of the first parameter to the power of the second using the es7 `**` operator.
*
* ### Example (es module)
* ```js
* import { power } from 'typescript-starter'
* console.log(power(2,3))
* // => 8
* ```
*
* ### Example (commonjs)
* ```js
* var power = require('typescript-starter').power;
* console.log(power(2,3))
* // => 8
* ```
*/
export function power(base, exponent) {
// This is a proposed es7 operator, which should be transpiled by Typescript
return base ** exponent;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnVtYmVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2NvcmUvZGVtby9udW1iZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0dBb0JHO0FBQ0gsTUFBTSxVQUFVLE1BQU0sQ0FBQyxLQUFhO0lBQ2xDLE9BQU8sS0FBSyxHQUFHLENBQUMsQ0FBQztBQUNuQixDQUFDO0FBRUQ7Ozs7Ozs7Ozs7Ozs7Ozs7R0FnQkc7QUFDSCxNQUFNLFVBQVUsS0FBSyxDQUFDLElBQVksRUFBRSxRQUFnQjtJQUNsRCw0RUFBNEU7SUFDNUUsT0FBTyxJQUFJLElBQUksUUFBUSxDQUFDO0FBQzFCLENBQUMifQ==