Comments (8)
here are the types it visits: https://github.com/palantir/documentalist/blob/master/src/plugins/typescript/visitor.ts#L44-L57. you can probably guess how to add functions.
from documentalist.
@streamich at the moment documentalist does not support function variables, but this would be easy to add in the typescript plugin.
from documentalist.
This library is basically my last only hope for generating types from TS at this point. I used to use react-docgen but that only works with Flow. I used Typedoc for a while, but its type declarations were INCREDIBLY complicated, and the JSON files up to 10 megs for a simple component...
My main issue is I'm not able to get any information from the Functional components in my docs. I really need the comment blocks that are associated with them... I poked around in the code but I don't know enough about it to find a way to include function declarations into the export JSON.
Any help would be great, I'm close to releasing my updated docs for https://jamesmfriedman.github.io/rmwc/ but this is a hurdle I still need to overcome.
from documentalist.
@jamesmfriedman one thing this library does really well is interfaces. If you declare interfaces for your functions then documenting them shouldn't be too hard.
For my functional components, I specify an interface for the props it needs and put any relevant comments on the interface.
from documentalist.
Thanks for the quick reply! Yeah I saw that as a workaround but VSCode and other tools read the main comment off the component itself. I might just go the route of having duplicate comments unless you know some other magical workaround.
from documentalist.
@jamesmfriedman Good point! I wonder how VsCode is doing it :)
from documentalist.
from documentalist.
Fixed by #104
from documentalist.
Related Issues (20)
- Please update marked dependency to remove install vulnerabilities warning HOT 1
- Inline typedoc tags like {@link}? HOT 2
- docs-app includes copyright license text interpreted as JSDoc
- Old dependencies in last 1.6 release HOT 2
- TSLint is deprecated, we should move to typescript-eslint
- Interface property default values include extra markup
- Some types include unnecessary empty type params list
- Regression in JSDoc markdown parsing
- include type arguments in entity name
- TypeScript does not parse files in node_modules
- Do we support line numbers for TypeScript? HOT 1
- Consider using libnpm instead of spawning npm process
- client code uses es2015 arrow function syntax HOT 1
- handlebars ambient types HACKHACK HOT 3
- @event tags are erased
- Potential typo in the lerna.json HOT 1
- TypeScript support for Utility Types HOT 3
- Markdown plugin fails to parse metadata when given a file with CR or CRLF line endings HOT 8
- Support for accessors HOT 1
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 documentalist.