Typescript types and/or fix up the JSDOC
multimeric opened this issue · 0 comments
multimeric commented
Hi, it looks like you've got types integrated already via jsdoc, but I tried to compile a typescript declaration using tsd-jsdoc, and it's giving me the following error:
$ jsdoc -t node_modules/tsd-jsdoc/dist -r /media/michael/Storage2/Programming/xpuz
[TSD-JSDoc] fulltext-search-ui.js:5:4 Failed to find parent of doclet '<anonymous>~SearcherDisplay' using memberof '<anonymous>', this is likely due to invalid JSDoc.
[TSD-JSDoc] index.js:16:2 Failed to find parent of doclet 'module.exports.Parsers' using memberof 'module.exports', this is likely due to invalid JSDoc.
[TSD-JSDoc] puzzle.js:69:4 Failed to find parent of doclet 'xpuz.ImmutablePuzzle' using memberof 'xpuz', this is likely due to invalid JSDoc.
[TSD-JSDoc] puzzle.js:85:2 Failed to find parent of doclet '<anonymous>~ImmutablePuzzle' using memberof '<anonymous>', this is likely due to invalid JSDoc.
[TSD-JSDoc] index.js:8:4 Failed to find parent of doclet 'xpuz.Puzzle' using memberof 'xpuz', this is likely due to invalid JSDoc.
[TSD-JSDoc] index.js:19:2 Failed to find parent of doclet 'module.exports.Parsers' using memberof 'module.exports', this is likely due to invalid JSDoc.
[TSD-JSDoc] index.js:31:2 Failed to find parent of doclet 'module.exports.Puzzle' using memberof 'module.exports', this is likely due to invalid JSDoc.
[TSD-JSDoc] puzzle-mixin.js:20:0 Failed to find parent of doclet 'xpuz.PuzzleMixin' using memberof 'xpuz', this is likely due to invalid JSDoc.
[TSD-JSDoc] puzzle.js:35:4 Failed to find parent of doclet 'xpuz.Puzzle' using memberof 'xpuz', this is likely due to invalid JSDoc.
[TSD-JSDoc] index.js:14:1 Failed to find parent of doclet 'module.exports.Parsers' using memberof 'module.exports', this is likely due to invalid JSDoc.
[TSD-JSDoc] puzzle.js:55:1 Failed to find parent of doclet 'xpuz.ImmutablePuzzle' using memberof 'xpuz', this is likely due to invalid JSDoc.
[TSD-JSDoc] index.js:9:6 Failed to find parent of doclet 'xpuz.Puzzle' using memberof 'xpuz', this is likely due to invalid JSDoc.
[TSD-JSDoc] index.js:20:1 Failed to find parent of doclet 'module.exports.Parsers' using memberof 'module.exports', this is likely due to invalid JSDoc.
[TSD-JSDoc] index.js:32:1 Failed to find parent of doclet 'module.exports.Puzzle' using memberof 'module.exports', this is likely due to invalid JSDoc.
[TSD-JSDoc] puz.js:1057:1 Failed to find parent of doclet 'module:xpuz/parsers/puz~PUZParser#PUZParser#parse' using memberof 'module:xpuz/parsers/puz~PUZParser#PUZParser', this is likely due to invalid JSDoc.
[TSD-JSDoc] puz.js:1084:1 Failed to find parent of doclet 'module:xpuz/parsers/puz~PUZParser#PUZParser#generate' using memberof 'module:xpuz/parsers/puz~PUZParser#PUZParser', this is likely due to invalid JSDoc.
[TSD-JSDoc] puzzle-mixin.js:14:0 Failed to find parent of doclet 'xpuz.PuzzleMixin' using memberof 'xpuz', this is likely due to invalid JSDoc.
[TSD-JSDoc] puzzle.js:42:1 Failed to find parent of doclet 'xpuz.Puzzle' using memberof 'xpuz', this is likely due to invalid JSDoc.
[TSD-JSDoc] ipuz.js:146:4 Unable to resolve type for module:xpuz/parsers/ipuz~IPUZParser, none specified in JSDoc. Defaulting to `any`.
[TSD-JSDoc] ipuz.js:146:4 Unable to resolve type for module:xpuz/parsers/ipuz~IPUZParser, none specified in JSDoc. Defaulting to `any`.
[TSD-JSDoc] jpz.js:47:4 Unable to resolve type for module:xpuz/parsers/jpz~JPZParser, none specified in JSDoc. Defaulting to `any`.
[TSD-JSDoc] jpz.js:47:4 Unable to resolve type for module:xpuz/parsers/jpz~JPZParser, none specified in JSDoc. Defaulting to `any`.
[TSD-JSDoc] ipuz.js:146:4 Unable to resolve type for module:xpuz/parsers/ipuz~IPUZParser, none specified in JSDoc. Defaulting to `any`.
[TSD-JSDoc] ipuz.js:146:4 Unable to resolve type for module:xpuz/parsers/ipuz~IPUZParser, none specified in JSDoc. Defaulting to `any`.
[TSD-JSDoc] jpz.js:47:4 Unable to resolve type for module:xpuz/parsers/jpz~JPZParser, none specified in JSDoc. Defaulting to `any`.
[TSD-JSDoc] jpz.js:47:4 Unable to resolve type for module:xpuz/parsers/jpz~JPZParser, none specified in JSDoc. Defaulting to `any`.
/media/michael/Storage2/Programming/GuardianCrosswordPlugin/node_modules/tsd-jsdoc/dist/assert_never.js:5
throw new Error("Unexpected object: " + JSON.stringify(x));
^
Error: Unexpected object: {"comment":"/**\n * Bluebird promise class\n * @external Bluebird\n * @see {@link http://bluebirdjs.com/docs/api-reference.html}\n */","meta":{"filename":"third-party.jsdoc","lineno":1,"columnno":0,"path":"/media/michael/Storage2/Programming/xpuz/src","code":{}},"description":"Bluebird promise class","kind":"external","name":"Bluebird","see":["{@link http://bluebirdjs.com/docs/api-reference.html}"],"longname":"external:Bluebird","scope":"global","___id":"T000002R022099","___s":true}
at Object.assertNever (/media/michael/Storage2/Programming/GuardianCrosswordPlugin/node_modules/tsd-jsdoc/dist/assert_never.js:5:11)
at Emitter._parseTreeNode (/media/michael/Storage2/Programming/GuardianCrosswordPlugin/node_modules/tsd-jsdoc/dist/Emitter.js:196:39)
at Emitter._parseTree (/media/michael/Storage2/Programming/GuardianCrosswordPlugin/node_modules/tsd-jsdoc/dist/Emitter.js:144:31)
at Emitter.parse (/media/michael/Storage2/Programming/GuardianCrosswordPlugin/node_modules/tsd-jsdoc/dist/Emitter.js:30:14)
at Object.publish (/media/michael/Storage2/Programming/GuardianCrosswordPlugin/node_modules/tsd-jsdoc/dist/publish.js:14:13)
at Object.module.exports.cli.generateDocs (/media/michael/Storage2/Programming/GuardianCrosswordPlugin/node_modules/jsdoc/cli.js:441:39)
at Object.module.exports.cli.processParseResults (/media/michael/Storage2/Programming/GuardianCrosswordPlugin/node_modules/jsdoc/cli.js:392:24)
at module.exports.cli.main (/media/michael/Storage2/Programming/GuardianCrosswordPlugin/node_modules/jsdoc/cli.js:235:18)
at Object.module.exports.cli.runCommand.cb [as runCommand] (/media/michael/Storage2/Programming/GuardianCrosswordPlugin/node_modules/jsdoc/cli.js:186:9)
at /media/michael/Storage2/Programming/GuardianCrosswordPlugin/node_modules/jsdoc/jsdoc.js:93:9
at Object.<anonymous> (/media/michael/Storage2/Programming/GuardianCrosswordPlugin/node_modules/jsdoc/jsdoc.js:94:3)
at Module._compile (internal/modules/cjs/loader.js:816:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10)
at Module.load (internal/modules/cjs/loader.js:685:32)
at Function.Module._load (internal/modules/cjs/loader.js:620:12)
at Function.Module.runMain (internal/modules/cjs/loader.js:877:12)
Would you mind either including TypeScript types in the repo or seeing if you can fix up the JSDoc such that the above command works? Unfortunately I don't know much about JSDoc so I don't think I can easily help with that. I'm hoping it won't be much work though.