The following file cannot be parsed:
export default class Option extends React.PureComponent {
props: {
selected: boolean,
disabled: boolean,
focus: boolean,
value: string,
children?: string,
onClick?: (string) => void,
};
...
}
I am using react-docgen indirectly through styleguidist. The following error message is output:
Cannot parse .../Option.js: TypeError: Cannot read property 'indent' of undefined
I guess that the issue has something to do with the onClick type annotation (string) => void, because if I change it to (value: string) => void it works again.