1.0.0 • Published 3 years ago

ts-docgen-loader v1.0.0

Weekly downloads
5
License
ISC
Repository
github
Last release
3 years ago

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;
}