'How to use JSDoc to document styled components props? [duplicate]

I have tried to document props on vscode with JSDoc multiple times on my custom styled component, but I just can't make it show up in any way.

what shows up for me

I have tried with the following syntax:

/**
 * @param {boolean} testprop - 20px
 */
export const Text``

export interface TextProps {
  /* 20px */ t2?: boolean
}
export const Text<TextProps>``

None of those 2 works so far.

  • Is there any way to make it show up when you hover the prop?
  • What's best practice for this?


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source