Comments (16)
Using -t node_modules/tsd-jsdoc/lib
instead leads to this error:
Generating output files...
node_modules/dts-dom/bin/index.js:385
switch (e.kind) {
^
TypeError: Cannot read property 'kind' of null
at writeReference (node_modules/dts-dom/bin/index.js:385:22)
at writeParameter (node_modules/dts-dom/bin/index.js:485:9)
at writeDelimited (node_modules/dts-dom/bin/index.js:494:13)
at writeFunction (node_modules/dts-dom/bin/index.js:473:9)
at writeDeclaration (node_modules/dts-dom/bin/index.js:650:28)
at Object.emit (node_modules/dts-dom/bin/index.js:229:5)
at Emitter.emit (node_modules/tsd-jsdoc/lib/Emitter.js:65:24)
at Object.publish (node_modules/tsd-jsdoc/lib/publish.js:25:39)
at Object.module.exports.cli.generateDocs (node_modules/jsdoc/cli.js:430:39)
at Object.module.exports.cli.processParseResults (node_modules/jsdoc/cli.js:383:20)
at module.exports.cli.main (node_modules/jsdoc/cli.js:227:14)
at Object.module.exports.cli.runCommand (node_modules/jsdoc/cli.js:180:5)
at node_modules/jsdoc/jsdoc.js:103:9
at Object.<anonymous> (node_modules/jsdoc/jsdoc.js:104:3)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
from tsd-jsdoc.
i should note that I'm using the latest 2.0.0-beta.1
from npm
from tsd-jsdoc.
Hmm, looks like jsdoc expects the publish.js file to be in the root folder of the template directory. I assumed it used the main
property of the package.json but I guess not. Can you try doing -t tsd-jsdoc
instead of specifying -t node_modules/...
?
As for the e.kind is null error, can you give me a js block that reproduces it?
from tsd-jsdoc.
For the first, I get a very similar error: FATAL: Unable to load template: Cannot find module 'tsd-jsdoc/publish
For the second, here's a minimal reproduction:
/**
* Duplicates the passed string
* @param {string} foo - the string to duplicate
* @return {string} the duplicated string
*/
function dupeStr(foo) {
return foo + foo;
}
from tsd-jsdoc.
also I can't get the tests to work at all.....
from tsd-jsdoc.
Thanks for trying that, I'll move the publish script around.
There aren't any "tests" yet, all npm test
does is run on the js files in there and output a file that I can look at manually. No automated testing yet. When you say "I can't get the tests to work all all" can you tell me what that means? Are you running on a cloned repo or the installed package? The installed package doesn't include the tests or anything.
I am able to reproduce the error you are getting though when used with the example you provided and no other code. Looking into that now.
from tsd-jsdoc.
I mean that if I clone the repo, do npm install, npm build, and npm test, I get an error.
lib/Emitter.js:349
dom.create.indexSignature('key', indexTypeStr, this._resolveTypeString(valueTypeStr, doclet, obj))
^
TypeError: dom.create.indexSignature is not a function
at Emitter._resolveTypeString (lib/Emitter.js:349:32)
at Emitter._resolveType (lib/Emitter.js:318:29)
at Emitter._resolveObjects (lib/Emitter.js:184:33)
at Emitter.parse (lib/Emitter.js:57:14)
at new Emitter (lib/Emitter.js:49:14)
at Object.publish (lib/publish.js:10:21)
at Object.module.exports.cli.generateDocs (node_modules/jsdoc/cli.js:430:39)
at Object.module.exports.cli.processParseResults (node_modules/jsdoc/cli.js:383:20)
at module.exports.cli.main (node_modules/jsdoc/cli.js:227:14)
at Object.module.exports.cli.runCommand (node_modules/jsdoc/cli.js:180:5)
at node_modules/jsdoc/jsdoc.js:103:9
at Object.<anonymous> (node_modules/jsdoc/jsdoc.js:104:3)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
from tsd-jsdoc.
Also, to be clear, I reduced down the minimal test case I provided earlier from ~1,000 lines of module code. The problem is clearly not that it's standalone.
from tsd-jsdoc.
The problem is clearly not that it's standalone.
When I ran it with all my other code it worked, I only got the error when I ran it on only this code piece. Turns out it was due to a logic error in how I handle the "private" config which is probably different in your config than in the repo's.
I get an error.
Can you share what the error is?
This should be fixed now in v2.0.0-beta.2
.
from tsd-jsdoc.
@englercj the error is in the comment
from tsd-jsdoc.
So the original error you got running on your code, was also the same error you got when running the tests?
Sorry, see that you edited the post.
from tsd-jsdoc.
No, that's a different error.
from tsd-jsdoc.
from tsd-jsdoc.
Looks like dts-dom hasn't released my additions that add support for indexSignature. I'm locally using HEAD
and not the tagged release, which is why it works for me.
Hopefully they release it soon. RyanCavanaugh/dts-dom#16
from tsd-jsdoc.
Ok, released, as long as you have 0.0.15
installed it should be good to go. Let me know if you have any more issues, open as many as you want. I appreciate you trying out the beta.
from tsd-jsdoc.
@englercj This error occures in version 2.0.0-beta.5
again.
from tsd-jsdoc.
Related Issues (20)
- ESLint for jsdoc doesn't recognize type `Class<T>` but does support `typeof T`
- @module name quotation marks included in declare module string
- Class specific callbacks HOT 11
- Incorrect warning: Failed to find parent of doclet HOT 4
- `@template` tag does not generate generic parameters HOT 2
- Possible to mark typedef / interface properties as readonly? HOT 2
- Using the word typeof in a doc comment breaks tsd-jsdoc output
- Syntax to get `this: this` into typings for function? HOT 2
- feature request: output filename
- How to generate with a ES5 JS file that is dependent on another library?
- Cannot instantiate type Cesium.Property. HOT 1
- keys may need quotes HOT 1
- Can this reexport classes?
- Support @event tag
- Add support for rest-parameter tuple types HOT 1
- Support <reference types="node" /> and adding import
- Typedefs with properties emit `type = { ... }` instead of an interface
- Support extends for typedef
- Using this library in conjunction with jsdoc-vuejs
- 'Failed to find parent of doclet' errors
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 tsd-jsdoc.