Skip to content

Did not recognize object of type "ObjectTypeSpreadProperty" #449

Closed
@danrot

Description

@danrot

I am using the react-styleguidist package, which makes use of react-docgen. When I want to build my styleguide, I get the following error:

Warning: Cannot parse src/Sulu/Bundle/AdminBundle/Resources/js/components/Checkbox/Checkbox.js: Error: did not recognize object of type "ObjectTypeSpreadProperty"

I am using flow for static type checks in this project, and I assume the error is because of type definitions using the spread operator, in this specific case:

type Props = {|
    ...SwitchProps,
    className?: string,
    onChange?: (checked: boolean, value?: string | number) => void,
    skin: 'dark' | 'light',
|};

Is there a reason this is not supported, or is this an error?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions