ts-docgen-loader
v1.0.0
Published
Webpack loader for generating documentation from typescript files
Downloads
2
Readme
ts-docgen-loader
Webpack loader for generating documentation from typescript files.
Usage example
import props from "!!ts-docgen-loader!./Component.tsx";
<PropsTable props={props} />;
// Component.tsx
interface IProps {
loading: boolean;
}
// The loader is looking for a default exported function
export default function Props(_props: IProps) {
return null;
}
Props interface
interface IProp {
name: string;
optional: boolean;
type: string;
defaultValue?: string;
description?: string;
}