pycodestyle icon indicating copy to clipboard operation
pycodestyle copied to clipboard

Tip for svelte components to add Intelliense hover hint for params.

Open Maxiviper117 opened this issue 1 year ago • 0 comments

In any svelte component, you can add this HTML comment to add intellisense hints.

<!-- 
    @component
    
    ## Example Heading
    
    @param exampleParam - An example parameter description
    
 -->

This means you can document all the available props, so use of the lib can see what is available and how to use the props without always going back to the website documentation.

Example

  • With a custom Svelte component here I called MyNode.svelte, I added the HTML comment with the @component and @props tags.

image

Now I get a hint

  • Whenever I hover over my imported component based on that contents of that HTML @component comment.

image

Thus this a can be done with all Svelvet svelte components.

Maxiviper117 avatar Jan 28 '24 12:01 Maxiviper117