graphql-markdown icon indicating copy to clipboard operation
graphql-markdown copied to clipboard

Add JSDoc type annotations for Typescript Docusaurus users

Open linjer opened this issue 3 years ago • 1 comments
trafficstars

Is your feature request related to a problem? Please describe. For Typescript Docusaurus users, the plugin generates a type error for the sidebar. This error is completely harmless and works regardless, but was a bit of a red herring. Not sure if this issue is present in any other situations.

Describe the solution you'd like Support for Typescript users. I believe the issue is easily resolved if the sidebar object is given the following JSDoc:

/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */

Describe alternatives you've considered It's benign so it can be easily ignored or one can manually add the JSDoc type annotation.

Additional context Screen Shot 2022-08-30 at 12 11 03 PM

linjer avatar Aug 30 '22 19:08 linjer

I will look into it. It is more than time for this package to provide a better support for Typescript Docusaurus 😅

edno avatar Aug 30 '22 19:08 edno

Fix released in 1.13.1: https://github.com/graphql-markdown/graphql-markdown/releases/tag/1.13.1

edno avatar Sep 04 '22 14:09 edno

Upgraded and confirmed this cleans up errors in my project out-of-the-box. Thanks!

linjer avatar Sep 06 '22 17:09 linjer