here's a simple repo : https://codesandbox.io/s/elastic-ellis-bzo8h8?file=/src/App.tsx
I want to see my props description like above picture.
type AnimalAttributes = "head" | "tail";
type Animal = {
/** more than one head or tail is gross */
[k in AnimalAttributes]: number;
};
const OneHeadCat = (props: Animal): React.ReactElement => {
return <div {...props}>meow!</div>;
};
export default function App() {
return (
<div className="App">
<h1>Hello CodeSandbox</h1>
<OneHeadCat head={2} tail={1} />
</div>
);
}
But code like these... using mapped Types
, tsdoc doesn't work as expected.
How can I solve this?