question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is tsdoc going to support generating React component API?

See original GitHub issue

Say there is a file like this

interface IProps {
   /**
    * Some description
    */
    name: string;
}
class Something extends React.Component<IProps, {}> {
    // code
}

Is tsdoc going to support generating React component API doc (eg, a markdown table)?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:8

github_iconTop GitHub Comments

3reactions
trusktrcommented, Jul 4, 2019

FWIW, one can write a tsdoc comment on the props property, which links to the Props interface, and the docs for that interface can have all the info.

3reactions
octogonzcommented, Jul 16, 2018

FYI this summer we are planning to enable API Extractor analysis for the office-ui-fabric-react library, which is a collection of React controls.

As far as I know, a documentation tool can model React controls as ordinary TypeScript classes and interfaces. If there are specific TSX features that you think would need special handling in the doc comment syntax, this would be in scope for TSDoc.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is tsdoc going to support generating React component API? #36
React components are initialized based on a call to React.createElement , not by doing new MyComponent (at least not explicitly) or ...
Read more >
TSDoc
TypeDoc: an API reference generator that extracts member documentation from code ... Visual Studio Code: an editor that supports syntax highlighting and ...
Read more >
TS: What is TSDoc?. The way to write the better comments
TSDoc is based on JSDoc so it supports typescript extension as well as ... You can define metadata and API documents for the...
Read more >
Intro to TypeScript Documentation with TSDoc - Cory Rylan
Learn how to use TSDoc to generate API Documentation for TypeScript and JavaScript.
Read more >
What is the proper format for typing React props in TSDoc?
You want to document the props interface, and not the component itself. Which means this is the same as documenting fields of an...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found