Skip to content

Instantly share code, notes, and snippets.

@webOS101

webOS101/err.txt Secret

Created May 23, 2017 05:57
Show Gist options
  • Save webOS101/adc7ce330079c24bb8d30e725779c6c5 to your computer and use it in GitHub Desktop.
Save webOS101/adc7ce330079c24bb8d30e725779c6c5 to your computer and use it in GitHub Desktop.
shelljs error output
stdout:
shellstring:
node_modules/.bin/documentation build node_modules/xxx/packages/core/handle --shallow /Users/xxx/workspace/xxx-docs/xxx-docs/pages/docs/modules
stdout: [
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "inlineCode",
"value": "core/handle",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 14,
"offset": 13
},
"indent": []
}
},
{
"type": "text",
"value": " provides a set of utilities to support handling events for ",
"position":
"start": {
"line": 1,
"column": 14,
"offset": 13
},
"end": {
"line": 1,
"column": 74,
"offset": 73
},
"indent": []
}
},
{
"type": "inlineCode",
"value": "kind()",
"position": {
"start": {
"line": 1,
"column": 74,
"offset": 73
},
"end": {
"line": 1,
"column": 82,
"offset": 81
},
"indent": []
}
},
{
"type": "text",
"value": "s and\n",
"position": {
"start": {
"line": 1,
"column": 82,
"offset": 81
},
"end": {
"line": 2,
"column": 1,
"offset": 87
},
"indent": [
1
]
}
},
{
"type": "inlineCode",
"value": "React.Component",
"position": {
"start": {
"line": 2,
"column": 1,
"offset": 87
},
"end": {
"line": 2,
"column": 18,
"offset": 104
},
"indent": []
}
},
{
"type": "text",
"value": "s. The default export, ",
"position": {
"start": {
"line": 2,
"column": 18,
"offset": 104
},
"end": {
"line": 2,
"column": 41,
"offset": 127
},
"indent": []
}
},
{
"type": "inlineCode",
"value": "handle()",
"position": {
"start": {
"line": 2,
"column": 41,
"offset": 127
},
"end": {
"line": 2,
"column": 51,
"offset": 137
},
"indent": []
}
},
{
"type": "text",
"value": ", generates an event handler function from a\nset of input functions. The input functions either process or filter the event. If an input\nfunction returns ",
"position": {
"start": {
"line": 2,
"column": 51,
"offset": 137
},
"end": {
"line": 4,
"column": 18,
"offset": 291
},
"indent": [
1,
1
]
}
},
{
"type": "inlineCode",
"value": "true",
"position": {
"start": {
"line": 4,
"column": 18,
"offset": 291
},
"end": {
"line": 4,
"column": 24,
"offset": 297
},
"indent": []
}
},
{
"type": "text",
"value": ", ",
"position": {
"start": {
"line": 4,
"column": 24,
"offset": 297
},
"end": {
"line": 4,
"column": 26,
"offset": 299
},
"indent": []
}
},
{
"type": "inlineCode",
"value": "handle()",
"position": {
"start": {
"line": 4,
"column": 26,
"offset": 299
},
"end": {
"line": 4,
"column": 36,
"offset": 309
},
"indent": []
}
},
{
"type": "text",
"value": " will continue processing the event by calling the next input\nfunction in the chain. If it returns ",
"position": {
"start": {
"line": 4,
"column": 36,
"offset": 309
},
"end": {
"line": 5,
"column": 38,
"offset": 408
},
"indent": [
1
]
}
},
{
"type": "inlineCode",
"value": "false",
"position": {
"start": {
"line": 5,
"column": 38,
"offset": 408
},
"end": {
"line": 5,
"column": 45,
"offset": 415
},
"indent": []
}
},
{
"type": "text",
"value": " (or any falsey value like ",
"position": {
"start": {
"line": 5,
"column": 45,
"offset": 415
},
"end": {
"line": 5,
"column": 72,
"offset": 442
},
"indent": []
}
},
{
"type": "inlineCode",
"value": "null",
"position": {
"start": {
"line": 5,
"column": 72,
"offset": 442
},
"end": {
"line": 5,
"column": 78,
"offset": 448
},
"indent": []
}
},
{
"type": "text",
"value": " or ",
"position": {
"start": {
"line": 5,
"column": 78,
"offset": 448
},
"end": {
"line": 5,
"column": 82,
"offset": 452
},
"indent": []
}
},
{
"type": "inlineCode",
"value": "undefined",
"position": {
"start": {
"line": 5,
"column": 82,
"offset": 452
},
"end": {
"line": 5,
"column": 93,
"offset": 463
},
"indent": []
}
},
{
"type": "text",
"value": "),\nthe event handling chain stops at that input function.",
"position": {
"start": {
"line": 5,
"column": 93,
"offset": 463
},
"end": {
"line": 6,
"column": 55,
"offset": 520
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 6,
"column": 55,
"offset": 520
},
"indent": [
1,
1,
1,
1,
1
]
}
},
{
"type": "code",
"lang": null,
"value": "import {forKey, forward, handle, preventDefault} from '@xxx/core/handle';\n\n// logEnter will contain a function that accepts an event, a props object, and a context object\nconst logEnter = handle(\n forward('onKeyDown'), // forwards the event to the function passed in the onKeyDown prop\n forKey('enter'), // if the event.keyCode maps to the enter key, allows event processing to continue\n preventDefault, // calls event.preventDefault() to prevent the `keypress` event\n (ev, props) => { // custom event handler -- in this case, logging some text\n // since it doesn't return `true`, no further input functions would be called after this one\n console.log('The Enter key was pressed down');\n }\n);",
"position": {
"start": {
"line": 8,
"column": 1,
"offset": 522
},
"end": {
"line": 21,
"column": 4,
"offset": 1255
},
"indent": [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
]
}
},
{
"type": "paragraph",
"children": [
{
"type": "inlineCode",
"value": "handle()",
"position": {
"start": {
"line": 23,
"column": 1,
"offset": 1257
},
"end": {
"line": 23,
"column": 11,
"offset": 1267
},
"indent": []
}
},
{
"type": "text",
"value": " can also be bound to a component instance which allows it to access the instance\n",
"position": {
"start": {
"line": 23,
"column": 11,
"offset": 1267
},
"end": {
"line": 24,
"column": 1,
"offset": 1349
},
"indent": [
1
]
}
},
{
"type": "inlineCode",
"value": "props",
"position": {
"start": {
"line": 24,
"column": 1,
"offset": 1349
},
"end": {
"line": 24,
"column": 8,
"offset": 1356
},
"indent": []
}
},
{
"type": "text",
"value": " and ",
"position": {
"start": {
"line": 24,
"column": 8,
"offset": 1356
},
"end": {
"line": 24,
"column": 13,
"offset": 1361
},
"indent": []
}
},
{
"type": "inlineCode",
"value": "context",
"position": {
"start": {
"line": 24,
"column": 13,
"offset": 1361
},
"end": {
"line": 24,
"column": 22,
"offset": 1370
},
"indent": []
}
},
{
"type": "text",
"value": ". This allows you to write consistent event handlers for components created\neither with ",
"position": {
"start": {
"line": 24,
"column": 22,
"offset": 1370
},
"end": {
"line": 25,
"column": 13,
"offset": 1458
},
"indent": [
1
]
}
},
{
"type": "inlineCode",
"value": "kind()",
"position": {
"start": {
"line": 25,
"column": 13,
"offset": 1458
},
"end": {
"line": 25,
"column": 21,
"offset": 1466
},
"indent": []
}
},
{
"type": "text",
"value": " or ES6 classes without worrying about from where the props are sourced.",
"position": {
"start": {
"line": 25,
"column": 21,
"offset": 1466
},
"end": {
"line": 25,
"column": 93,
"offset": 1538
},
"indent": []
}
}
],
"position": {
"start": {
"line": 23,
"column": 1,
"offset": 1257
},
"end": {
"line": 25,
"column": 93,
"offset": 1538
},
"indent": [
1,
1
]
}
},
{
"type": "code",
"lang": null,
"value": "import {forKey, forward, handle, preventDefault} from '@xxx/core/handle';\nimport React from 'react';\n\nclass MyComponent extends React.Component {\n // bind handle() to the instance\n handle = handle.bind(this)\n\n // then create handlers using the bound function\n logEnter = this.handle(\n forward('onKeyDown'), // forwards the event to the function passed in the onKeyDown prop\n forKey('enter'), // if the event.keyCode maps to the enter key, allows event processing to continue\n preventDefault, // calls event.preventDefault() to prevent the `keypress` event\n (ev, props) => { // custom event handler -- in this case, logging some text\n // In the bound version, `props` will contain a reference to this.props\n // since it doesn't return `true`, no further input functions would be called after this one\n console.log('The Enter key was pressed down');\n }\n )\n\n render () {\n // ...\n }\n}",
"position": {
"start": {
"line": 27,
"column": 1,
"offset": 1540
},
"end": {
"line": 51,
"column": 4,
"offset": 2490
},
"indent": [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 51,
"column": 4,
"offset": 2490
}
}
},
"tags": [
{
"title": "module",
"description": null,
"lineNumber": 53,
"type": null,
"name": "core/handle"
}
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 55,
"column": 3
}
},
"context": {
"loc": {
"start": {
"line": 57,
"column": 0
},
"end": {
"line": 57,
"column": 40
}
},
"file": "/Users/xxx/workspace/xxx-docs/xxx-docs/node_modules/xxx/packages/core/handle/handle.js"
},
"kind": "module",
"name": "core/handle",
"members": {
"instance": [],
"static": [
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Allows generating event handlers by chaining input functions to filter or short-circuit the\nhandling flow. Any input function that returns a falsey value will stop the chain.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 83,
"offset": 174
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 83,
"offset": 174
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 83,
"offset": 174
}
}
},
"tags": [
{
"title": "method",
"description": null,
"lineNumber": 4,
"name": "handle"
},
{
"title": "memberof",
"description": "core/handle",
"lineNumber": 5
},
{
"title": "param",
"description": "List of handlers to process the event",
"lineNumber": 6,
"type": {
"type": "RestType",
"expression": {
"type": "NameExpression",
"name": "Function"
}
},
"name": "handlers"
},
{
"title": "returns",
"description": "A function that accepts an event which is dispatched to each of the\n provided handlers.",
"lineNumber": 7,
"type": {
"type": "NameExpression",
"name": "Function"
}
}
],
"loc": {
"start": {
"line": 77,
"column": 0
},
"end": {
"line": 86,
"column": 3
}
},
"context": {
"loc": {
"start": {
"line": 87,
"column": 0
},
"end": {
"line": 101,
"column": 2
}
},
"file": "/Users/xxx/workspace/xxx-docs/xxx-docs/node_modules/xxx/packages/core/handle/handle.js"
},
"kind": "function",
"name": "handle",
"memberof": "core/handle",
"params": [
{
"name": "handlers",
"lineNumber": 6,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "List of handlers to process the event",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 38,
"offset": 37
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 38,
"offset": 37
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 38,
"offset": 37
}
}
},
"type": {
"type": "RestType",
"expression": {
"type": "NameExpression",
"name": "Function"
}
}
}
],
"returns": [
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A function that accepts an event which is dispatched to each of the\n provided handlers.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 44,
"offset": 111
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 44,
"offset": 111
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 44,
"offset": 111
}
}
},
"type": {
"type": "NameExpression",
"name": "Function"
}
}
],
"members": {
"instance": [],
"static": [],
"events": []
},
"path": [
{
"name": "core/handle",
"kind": "module"
},
{
"name": "handle",
"kind": "function"
}
],
"namespace": "core/handlehandle"
},
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Allows handling to continue if the value of ",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 45,
"offset": 44
},
"indent": []
}
},
{
"type": "inlineCode",
"value": "prop",
"position": {
"start": {
"line": 1,
"column": 45,
"offset": 44
},
"end": {
"line": 1,
"column": 51,
"offset": 50
},
"indent": []
}
},
{
"type": "text",
"value": " on the event strictly equals ",
"position": {
"start": {
"line": 1,
"column": 51,
"offset": 50
},
"end": {
"line": 1,
"column": 81,
"offset": 80
},
"indent": []
}
},
{
"type": "inlineCode",
"value": "value",
"position": {
"start": {
"line": 1,
"column": 81,
"offset": 80
},
"end": {
"line": 1,
"column": 88,
"offset": 87
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 88,
"offset": 87
},
"indent": []
}
},
{
"type": "code",
"lang": null,
"value": "import {forEventProp, handle} from '@xxx/core/handle';\n\nconst logWhenXEqualsZero = handle(\n forEventProp('x', 0),\n (ev) => console.log('ev.x was equal to zero')\n);",
"position": {
"start": {
"line": 3,
"column": 1,
"offset": 89
},
"end": {
"line": 10,
"column": 4,
"offset": 264
},
"indent": [
1,
1,
1,
1,
1,
1,
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 10,
"column": 4,
"offset": 264
}
}
},
"tags": [
{
"title": "method",
"description": null,
"lineNumber": 12,
"name": "forEventProp"
},
{
"title": "memberof",
"description": "core/handle",
"lineNumber": 13
},
{
"title": "param",
"description": "Name of property on event",
"lineNumber": 14,
"type": {
"type": "NameExpression",
"name": "String"
},
"name": "prop"
},
{
"title": "param",
"description": "Value of property",
"lineNumber": 15,
"type": {
"type": "AllLiteral"
},
"name": "value"
},
{
"title": "param",
"description": "Event",
"lineNumber": 16,
"type": {
"type": "NameExpression",
"name": "Object"
},
"name": "ev"
},
{
"title": "returns",
"description": "Returns `true` if `prop` on `event` strictly equals `value`",
"lineNumber": 17,
"type": {
"type": "NameExpression",
"name": "Boolean"
}
}
],
"loc": {
"start": {
"line": 154,
"column": 0
},
"end": {
"line": 172,
"column": 3
}
},
"context": {
"loc": {
"start": {
"line": 173,
"column": 0
},
"end": {
"line": 175,
"column": 3
}
},
"file": "/Users/xxx/workspace/xxx-docs/xxx-docs/node_modules/xxx/packages/core/handle/handle.js"
},
"kind": "function",
"name": "forEventProp",
"memberof": "core/handle",
"params": [
{
"name": "prop",
"lineNumber": 14,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Name of property on event",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 26,
"offset": 25
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 26,
"offset": 25
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 26,
"offset": 25
}
}
},
"type": {
"type": "NameExpression",
"name": "String"
}
},
{
"name": "value",
"lineNumber": 15,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Value of property",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 18,
"offset": 17
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 18,
"offset": 17
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 18,
"offset": 17
}
}
},
"type": {
"type": "AllLiteral"
}
},
{
"name": "ev",
"lineNumber": 16,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Event",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 6,
"offset": 5
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 6,
"offset": 5
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 6,
"offset": 5
}
}
},
"type": {
"type": "NameExpression",
"name": "Object"
}
}
],
"returns": [
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Returns ",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 9,
"offset": 8
},
"indent": []
}
},
{
"type": "inlineCode",
"value": "true",
"position": {
"start": {
"line": 1,
"column": 9,
"offset": 8
},
"end": {
"line": 1,
"column": 15,
"offset": 14
},
"indent": []
}
},
{
"type": "text",
"value": " if ",
"position": {
"start": {
"line": 1,
"column": 15,
"offset": 14
},
"end": {
"line": 1,
"column": 19,
"offset": 18
},
"indent": []
}
},
{
"type": "inlineCode",
"value": "prop",
"position": {
"start": {
"line": 1,
"column": 19,
"offset": 18
},
"end": {
"line": 1,
"column": 25,
"offset": 24
},
"indent": []
}
},
{
"type": "text",
"value": " on ",
"position": {
"start": {
"line": 1,
"column": 25,
"offset": 24
},
"end": {
"line": 1,
"column": 29,
"offset": 28
},
"indent": []
}
},
{
"type": "inlineCode",
"value": "event",
"position": {
"start": {
"line": 1,
"column": 29,
"offset": 28
},
"end": {
"line": 1,
"column": 36,
"offset": 35
},
"indent": []
}
},
{
"type": "text",
"value": " strictly equals ",
"position": {
"start": {
"line": 1,
"column": 36,
"offset": 35
},
"end": {
"line": 1,
"column": 53,
"offset": 52
},
"indent": []
}
},
{
"type": "inlineCode",
"value": "value",
"position": {
"start": {
"line": 1,
"column": 53,
"offset": 52
},
"end": {
"line": 1,
"column": 60,
"offset": 59
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 60,
"offset": 59
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 60,
"offset": 59
}
}
},
"type": {
"type": "NameExpression",
"name": "Boolean"
}
}
],
"members": {
"instance": [],
"static": [],
"events": []
},
"path": [
{
"name": "core/handle",
"kind": "module"
},
{
"name": "forEventProp",
"kind": "function"
}
],
"namespace": "core/handleforEventProp"
},
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Forwards the event to a function at ",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 37,
"offset": 36
},
"indent": []
}
},
{
"type": "inlineCode",
"value": "name",
"position": {
"start": {
"line": 1,
"column": 37,
"offset": 36
},
"end": {
"line": 1,
"column": 43,
"offset": 42
},
"indent": []
}
},
{
"type": "text",
"value": " on ",
"position": {
"start": {
"line": 1,
"column": 43,
"offset": 42
},
"end": {
"line": 1,
"column": 47,
"offset": 46
},
"indent": []
}
},
{
"type": "inlineCode",
"value": "props",
"position": {
"start": {
"line": 1,
"column": 47,
"offset": 46
},
"end": {
"line": 1,
"column": 54,
"offset": 53
},
"indent": []
}
},
{
"type": "text",
"value": ". If the specified prop is ",
"position": {
"start": {
"line": 1,
"column": 54,
"offset": 53
},
"end": {
"line": 1,
"column": 81,
"offset": 80
},
"indent": []
}
},
{
"type": "inlineCode",
"value": "undefined",
"position": {
"start": {
"line": 1,
"column": 81,
"offset": 80
},
"end": {
"line": 1,
"column": 92,
"offset": 91
},
"indent": []
}
},
{
"type": "text",
"value": " or\nis not a function, it is ignored. The return value of the forwarded function is ignored and\n",
"position": {
"start": {
"line": 1,
"column": 92,
"offset": 91
},
"end": {
"line": 3,
"column": 1,
"offset": 187
},
"indent": [
1,
1
]
}
},
{
"type": "inlineCode",
"value": "true",
"position": {
"start": {
"line": 3,
"column": 1,
"offset": 187
},
"end": {
"line": 3,
"column": 7,
"offset": 193
},
"indent": []
}
},
{
"type": "text",
"value": " is always returned instead.",
"position": {
"start": {
"line": 3,
"column": 7,
"offset": 193
},
"end": {
"line": 3,
"column": 35,
"offset": 221
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 3,
"column": 35,
"offset": 221
},
"indent": [
1,
1
]
}
},
{
"type": "code",
"lang": null,
"value": "import {forward, handle} from '@xxx/core/handle';\n\nconst forwardAndLog = handle(\n forward('onClick'),\n (ev) => console.log('event forwarded to onClick from props')\n);",
"position": {
"start": {
"line": 5,
"column": 1,
"offset": 223
},
"end": {
"line": 12,
"column": 4,
"offset": 401
},
"indent": [
1,
1,
1,
1,
1,
1,
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 12,
"column": 4,
"offset": 401
}
}
},
"tags": [
{
"title": "method",
"description": null,
"lineNumber": 14,
"name": "forward"
},
{
"title": "memberof",
"description": "core/handle",
"lineNumber": 15
},
{
"title": "param",
"description": "Name of method on the `props`",
"lineNumber": 16,
"type": {
"type": "NameExpression",
"name": "String"
},
"name": "name"
},
{
"title": "param",
"description": "Event",
"lineNumber": 17,
"type": {
"type": "NameExpression",
"name": "Object"
},
"name": "ev"
},
{
"title": "param",
"description": "Props object",
"lineNumber": 18,
"type": {
"type": "NameExpression",
"name": "Object"
},
"name": "props"
},
{
"title": "returns",
"description": "Always returns `true`",
"lineNumber": 19,
"type": {
"type": "NameExpression",
"name": "Boolean"
}
}
],
"loc": {
"start": {
"line": 177,
"column": 0
},
"end": {
"line": 197,
"column": 3
}
},
"context": {
"loc": {
"start": {
"line": 198,
"column": 0
},
"end": {
"line": 205,
"column": 3
}
},
"file": "/Users/xxx/workspace/xxx-docs/xxx-docs/node_modules/xxx/packages/core/handle/handle.js"
},
"kind": "function",
"name": "forward",
"memberof": "core/handle",
"params": [
{
"name": "name",
"lineNumber": 16,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Name of method on the ",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 23,
"offset": 22
},
"indent": []
}
},
{
"type": "inlineCode",
"value": "props",
"position": {
"start": {
"line": 1,
"column": 23,
"offset": 22
},
"end": {
"line": 1,
"column": 30,
"offset": 29
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 30,
"offset": 29
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 30,
"offset": 29
}
}
},
"type": {
"type": "NameExpression",
"name": "String"
}
},
{
"name": "ev",
"lineNumber": 17,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Event",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 6,
"offset": 5
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 6,
"offset": 5
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 6,
"offset": 5
}
}
},
"type": {
"type": "NameExpression",
"name": "Object"
}
},
{
"name": "props",
"lineNumber": 18,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Props object",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 13,
"offset": 12
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 13,
"offset": 12
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 13,
"offset": 12
}
}
},
"type": {
"type": "NameExpression",
"name": "Object"
}
}
],
"returns": [
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Always returns ",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 16,
"offset": 15
},
"indent": []
}
},
{
"type": "inlineCode",
"value": "true",
"position": {
"start": {
"line": 1,
"column": 16,
"offset": 15
},
"end": {
"line": 1,
"column": 22,
"offset": 21
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 22,
"offset": 21
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 22,
"offset": 21
}
}
},
"type": {
"type": "NameExpression",
"name": "Boolean"
}
}
],
"members": {
"instance": [],
"static": [],
"events": []
},
"path": [
{
"name": "core/handle",
"kind": "module"
},
{
"name": "forward",
"kind": "function"
}
],
"namespace": "core/handleforward"
},
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls ",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 7,
"offset": 6
},
"indent": []
}
},
{
"type": "inlineCode",
"value": "event.preventDefault()",
"position": {
"start": {
"line": 1,
"column": 7,
"offset": 6
},
"end": {
"line": 1,
"column": 31,
"offset": 30
},
"indent": []
}
},
{
"type": "text",
"value": " and returns ",
"position": {
"start": {
"line": 1,
"column": 31,
"offset": 30
},
"end": {
"line": 1,
"column": 44,
"offset": 43
},
"indent": []
}
},
{
"type": "inlineCode",
"value": "true",
"position": {
"start": {
"line": 1,
"column": 44,
"offset": 43
},
"end": {
"line": 1,
"column": 50,
"offset": 49
},
"indent": []
}
},
{
"type": "text",
"value": ".",
"position": {
"start": {
"line": 1,
"column": 50,
"offset": 49
},
"end": {
"line": 1,
"column": 51,
"offset": 50
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 51,
"offset": 50
},
"indent": []
}
},
{
"type": "code",
"lang": null,
"value": "import {handle, preventDefault} from '@xxx/core/handle';\n\nconst preventAndLog = handle(\n preventDefault,\n (ev) => console.log('preventDefault called')\n);",
"position": {
"start": {
"line": 3,
"column": 1,
"offset": 52
},
"end": {
"line": 10,
exec: internal error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment