Skip to content

Add support for imported propTypes #33

Description

@echenley

Importing prop types is a fairly common use case which doesn't appear to be possible at this stage. Any plans to support this pattern?

Example:

// defaultPropTypes.jsimport{PropTypes}from'react';exportdefault{prop1: PropTypes.string};
// otherPropTypes.jsimport{PropTypes}from'react';exportdefault{prop2: PropTypes.object};
// MyComponent.jsximport{Component}from'react';importdefaultPropTypesfrom'./defaultPropTypes.js';importotherPropTypes'./otherPropTypes.js';exportdefaultclassMyComponentextendsComponent{staticpropTypes={
...defaultPropTypes,
...otherPropTypes}// etc...}

Results in:

{
"MyComponent.jsx": {
"description": ""
}
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions