Comments (8)
Looks like this is due to parameter destruction, e.g.:
subscribe({topic, onNext, onError, onCompleted}) {
return this.observe(topic).subscribe(onNext, onError, onCompleted);
}
from esdoc.
yep, so, this function:
observe({channel, topic}) {
return this.channel(channel).observe(topic);
}
produces this tree:
{ kind: 'method',
static: false,
variation: null,
name: 'observe',
memberof: 'src/rxmq.js~Rxmq',
longname: 'src/rxmq.js~Rxmq#observe',
access: 'public',
description: null,
lineNumber: 17,
undocument: true,
params: [ { description: undefined } ],
return: { types: [ '*' ], description: undefined },
generator: false,
___id: 'T000002R000031',
___s: true }
and as you can see, params
is complete wrong here.
Trying to figure out why and maybe create a PR.
from esdoc.
Interesting thing - if you manually create jsdoc that splits those params into single ones - it compiles OK
from esdoc.
@yamalight Hi! Thank you for this issue!
This is known ESDoc problem. 😓
With documentation tag, success to build documentation.
class Foo {
/**
* @param {{a: string, b: number, c: boolean}} myObject - this is my object.
*/
method({a, b, c}){}
}
But if without documentation tag, occur problem to build documentation.
class Foo {
method({a, b, c}){}
}
Now, workaround is to use Object Param Syntax.
I will want to fix this issue in next version.
from esdoc.
@h13i32maru yup, object params is exactly what I'd used so far.
thanks for quick response! 👍
from esdoc.
It's kind of hard to figure out where in your source code the problem arises.
If this is not easily fixed, please at least print some helpful information so users can figure out how to avoid the problem.
Any tips besides editing esdoc sources to log/debug?
I did exactly that, edited esdoc sources, to figure out.
For others who encounter such problems, here is how I did it.
In my case, the error was this:
D:\Projects\NISV\source\client\client-core\node_modules\esdoc\out\src\Publisher\Builder\DocBuilder.js:483
throw _iteratorError2;
^
TypeError: Cannot read property 'indexOf' of undefined
at IdentifiersDocBuilder._buildSignatureHTML (D:\Projects\NISV\source\client\client-core\node_modules\esdoc\out\src\Publisher\Builder\DocBuilder.js:1144:26)
at D:\Projects\NISV\source\client\client-core\node_modules\esdoc\out\src\Publisher\Builder\DocBuilder.js:512:38
at IceCap.loop (D:\Projects\NISV\source\client\client-core\node_modules\ice-cap\out\src\IceCap.js:261:9)
at IdentifiersDocBuilder._buildSummaryDoc (D:\Projects\NISV\source\client\client-core\node_modules\esdoc\out\src\Publisher\Builder\DocBuilder.js:509:11)
at IdentifiersDocBuilder._buildSummaryHTML (D:\Projects\NISV\source\client\client-core\node_modules\esdoc\out\src\Publisher\Builder\DocBuilder.js:468:29)
at IdentifiersDocBuilder._buildIdentifierDoc (D:\Projects\NISV\source\client\client-core\node_modules\esdoc\out\src\Publisher\Builder\IdentifiersDocBuilder.js:77:40)
at IdentifiersDocBuilder.exec (D:\Projects\NISV\source\client\client-core\node_modules\esdoc\out\src\Publisher\Builder\IdentifiersDocBuilder.js:52:32)
at publish (D:\Projects\NISV\source\client\client-core\node_modules\esdoc\out\src\Publisher\publish.js:167:65)
at Function.generate (D:\Projects\NISV\source\client\client-core\node_modules\esdoc\out\src\ESDoc.js:204:7)
at ESDocCLI.exec (D:\Projects\NISV\source\client\client-core\node_modules\esdoc\out\src\ESDocCLI.js:90:28)
So, I edited node_modules\esdoc\out\src\Publisher\Builder\DocBuilder.js
and placed this code in line 1144:
if (!paramName) {
console.warn('--------------------- CRASH LOG -----------------------');
console.log(doc);
console.warn('-------------------------------------------------------');
}
and it helped me figure out the problematic sources:
--------------------- CRASH LOG -----------------------
{ __docId__: 3360,
kind: 'function',
static: true,
variation: null,
name: 'normalizeRangeAbs',
memberof: 'src/mediaplayer/flux/helpers/assetRangeHelper.js',
longname: 'src/mediaplayer/flux/helpers/assetRangeHelper.js~normalizeRangeAbs',
access: 'public',
export: true,
importPath: 'client-core/src/mediaplayer/flux/helpers/assetRangeHelper.js',
importStyle: '{normalizeRangeAbs}',
description: null,
lineNumber: 18,
undocument: true,
params:
[ { description: undefined },
{ name: 'asset', types: [Object], description: undefined } ],
return: { types: [ '*' ], description: undefined },
generator: false,
___id: 'T000002R003362',
___s: true }
-------------------------------------------------------
D:\Projects\NISV\source\client\client-core\node_modules\esdoc\out\src\Publisher\Builder\DocBuilder.js:483
throw _iteratorError2;
^
from esdoc.
I've got similar problem:
badge.svg
/usr/local/lib/node_modules/esdoc/out/src/Publisher/Builder/DocBuilder.js:483
throw _iteratorError2;
^
TypeError: Cannot read property 'replace' of undefined
at /usr/local/lib/node_modules/esdoc/out/src/Publisher/Builder/DocBuilder.js:924:34
at Array.map (native)
at IdentifiersDocBuilder._buildTypeDocLinkHTML (/usr/local/lib/node_modules/esdoc/out/src/Publisher/Builder/DocBuilder.js:919:41)
at IdentifiersDocBuilder._buildSignatureHTML (/usr/local/lib/node_modules/esdoc/out/src/Publisher/Builder/DocBuilder.js:1202:40)
at /usr/local/lib/node_modules/esdoc/out/src/Publisher/Builder/DocBuilder.js:512:38
at IceCap.loop (/usr/local/lib/node_modules/esdoc/node_modules/ice-cap/out/src/IceCap.js:261:9)
at IdentifiersDocBuilder._buildSummaryDoc (/usr/local/lib/node_modules/esdoc/out/src/Publisher/Builder/DocBuilder.js:509:11)
at IdentifiersDocBuilder._buildSummaryHTML (/usr/local/lib/node_modules/esdoc/out/src/Publisher/Builder/DocBuilder.js:468:29)
at IdentifiersDocBuilder._buildIdentifierDoc (/usr/local/lib/node_modules/esdoc/out/src/Publisher/Builder/IdentifiersDocBuilder.js:77:40)
at IdentifiersDocBuilder.exec (/usr/local/lib/node_modules/esdoc/out/src/Publisher/Builder/IdentifiersDocBuilder.js:52:32)
added console log on 923 line
if (!tmp.length < 2) {
console.warn('--------------------- CRASH LOG -----------------------');
console.log(tmp);
console.warn('-------------------------------------------------------');
}
and got log below
--------------------- CRASH LOG -----------------------
[ '*' ]
-------------------------------------------------------
hope it will be helpful
from esdoc.
Please check latest version.
from esdoc.
Related Issues (20)
- @returns v.s @return - ambiguity causes inconsistency HOT 3
- Bug: Magically infer the return data type of a function is not working correctly.
- Make esdoc responsive on mobile
- Defining Identifies
- Outdated website / docs HOT 4
- Project Dead? HOT 18
- Add support for asciidoc manuals
- rewrite links: .md -> .html
- Table of Contents rendering with display: none
- import.meta.url will throw an error
- Linked markdown files in README don't get HTMLized, so get lost in documentation
- Cannot read property 'program' of undefined HOT 1
- @type description after dot is ignored/removed in docs
- please consider supporting the @readonly tag
- How to disable doc for just a line
- runtime error
- Can't parse private members of classes
- Can't parse `||=` operator. HOT 1
- Documenting events?
- Dependency ice-cap isn't maintained
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esdoc.