You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Component docs are autogenerated with scripts/autogenerate.js.
There are two issues that we could try improve:
Allow adding description with code examples to the component documentation.
I couldn't find a way to create nice description with code examples. @example tag (https://jsdoc.app/tags-example) doesn't seem to work.
Better JSDoc for ref objects. This may be little bit harder to do and less important.
Components are functions which exposes methods using React.useImperativeHandle. To properly generate docs for those methods we need to add JSDocs. If we want to use it with TypeScript project, we can import MapViewRef interface but since this interface doesn't have JSDocs (only useImperativeHandle has it) we don't see documentation in the code editor.
We would have to duplicate JSDOc which doesn't sound like a good idea. Maybe our script could use doc from the ref interface somehow?
The text was updated successfully, but these errors were encountered:
Motivation
Component docs are autogenerated with
scripts/autogenerate.js
.There are two issues that we could try improve:
I couldn't find a way to create nice description with code examples.
@example
tag (https://jsdoc.app/tags-example) doesn't seem to work.Components are functions which exposes methods using
React.useImperativeHandle
. To properly generate docs for those methods we need to addJSDocs
. If we want to use it with TypeScript project, we can importMapViewRef
interface but since this interface doesn't have JSDocs (only useImperativeHandle has it) we don't see documentation in the code editor.We would have to duplicate JSDOc which doesn't sound like a good idea. Maybe our script could use doc from the ref interface somehow?
The text was updated successfully, but these errors were encountered: