es7-typescript-starter
Version:
An es7/typescript starter for building javascript libraries
178 lines • 4.04 kB
JSON
{
"id": 0,
"name": "es7-typescript-starter",
"kind": 0,
"flags": {},
"children": [
{
"id": 8,
"name": "asyncABC",
"kind": 64,
"kindString": "Function",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 9,
"name": "asyncABC",
"kind": 4096,
"kindString": "Call signature",
"flags": {},
"comment": {
"shortText": "A sample async function (to demo Typescript's es7 async/await downleveling).",
"text": "### Example (es imports)\n```js\nimport { asyncABC } from 'es7-typescript-starter'\nconsole.log(await asyncABC())\n// => ['a','b','c']\n```\n\n### Example (commonjs)\n```js\nvar double = require('es7-typescript-starter').asyncABC;\nasyncABC().then(console.log);\n// => ['a','b','c']\n```\n",
"returns": "a Promise which should contain `['a','b','c']`\n"
},
"type": {
"type": "reference",
"name": "Promise",
"typeArguments": [
{
"type": "reference",
"name": "Array",
"typeArguments": [
{
"type": "instrinct",
"name": "string"
}
]
}
]
}
}
],
"sources": [
{
"fileName": "lib/asyncOps.ts",
"line": 20,
"character": 30
}
]
},
{
"id": 1,
"name": "double",
"kind": 64,
"kindString": "Function",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 2,
"name": "double",
"kind": 4096,
"kindString": "Call signature",
"flags": {},
"comment": {
"shortText": "Multiplies a value by 2. (Also a full example of Typedoc's functionality.)",
"text": "### Example (es module)\n```js\nimport { double } from 'es7-typescript-starter'\nconsole.log(double(4))\n// => 8\n```\n\n### Example (commonjs)\n```js\nvar double = require('es7-typescript-starter').double;\nconsole.log(double(4))\n// => 8\n```\n",
"returns": "Comment describing the return type.",
"tags": [
{
"tag": "anothernote",
"text": "Some other value.\n"
}
]
},
"parameters": [
{
"id": 3,
"name": "value",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"comment": {
"text": "Comment describing the `value` parameter."
},
"type": {
"type": "instrinct",
"name": "number"
}
}
],
"type": {
"type": "instrinct",
"name": "number"
}
}
],
"sources": [
{
"fileName": "lib/numberOps.ts",
"line": 22,
"character": 22
}
]
},
{
"id": 4,
"name": "power",
"kind": 64,
"kindString": "Function",
"flags": {
"isExported": true
},
"signatures": [
{
"id": 5,
"name": "power",
"kind": 4096,
"kindString": "Call signature",
"flags": {},
"comment": {
"shortText": "Raise the value of the first parameter to the power of the second using the es7 `**` operator.",
"text": "### Example (es module)\n```js\nimport { power } from 'es7-typescript-starter'\nconsole.log(power(2,3))\n// => 8\n```\n\n### Example (commonjs)\n```js\nvar power = require('es7-typescript-starter').power;\nconsole.log(power(2,3))\n// => 8\n```\n"
},
"parameters": [
{
"id": 6,
"name": "base",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"type": {
"type": "instrinct",
"name": "number"
}
},
{
"id": 7,
"name": "exponent",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"type": {
"type": "instrinct",
"name": "number"
}
}
],
"type": {
"type": "instrinct",
"name": "number"
}
}
],
"sources": [
{
"fileName": "lib/numberOps.ts",
"line": 43,
"character": 21
}
]
}
],
"groups": [
{
"title": "Functions",
"kind": 64,
"children": [
8,
1,
4
]
}
]
}