-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does not return types from imported modules #375
Comments
I noticed that this works when you do |
This is also true for the following: import { COLOR_TYPES } from '@core/components/Icon/Icon';
export interface NavigationIconProps {
/** Color of the icon */
color?: COLOR_TYPES;
} Where |
There was no activity for a long time. The issue will be closed soon. |
Closing this issue as obsolete. |
Did you find any solution to this? |
(This issue wraps up the following issues: #113 #371, possibly others)
If your component's typing comes from an external module, it is currently not returned by react-docgen-typescript.
Example:
Running
parse
on this file returns no results, even though Typescript absolutely knows the type of Button.I think the fix is fairly easy. Just rewrite this code to not return null if there're no comments, and instead apply the defaultProps optionally. Doing this, the resulting component name is not optimal (it becomes the name of the type), but we could just use the variable name of the default import (
Button
), which is what #113 suggested.This is a problem for users of Storybook (storybookjs/storybook#12185)
The text was updated successfully, but these errors were encountered: