extract-react-types
extract-react-types copied to clipboard
Can't extract types from namespace type.
I use namespace to define common types like below:
export declare namespace TypeAttributes {
type Color =
| "primary"
| "secondary"
| "success"
| "warning"
| "danger"
| "info";
}
and use it in type definition.
export type ComponentProps = {
/**
* The color to apply to component
*/
color?: TypeAttributes.Color;
}
it shows: Type: TypeAttributes.Color instead of "union, one of xxxxx".
any idea how to make this work?