Giter Club home page Giter Club logo

Comments (8)

giladgray avatar giladgray commented on June 3, 2024 1

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.

giladgray avatar giladgray commented on June 3, 2024

@streamich at the moment documentalist does not support function variables, but this would be easy to add in the typescript plugin.

from documentalist.

jamesmfriedman avatar jamesmfriedman commented on June 3, 2024

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.

StJohn3D avatar StJohn3D commented on June 3, 2024

@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.

jamesmfriedman avatar jamesmfriedman commented on June 3, 2024

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.

StJohn3D avatar StJohn3D commented on June 3, 2024

@jamesmfriedman Good point! I wonder how VsCode is doing it :)

from documentalist.

styu avatar styu commented on June 3, 2024

from documentalist.

adidahiya avatar adidahiya commented on June 3, 2024

Fixed by #104

from documentalist.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.