-
Notifications
You must be signed in to change notification settings - Fork 252
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
Incorrect Display of Custom Type Attributes in Documentation #487
Comments
Yes, I have encountered it too. Have you resolved it? |
是的,改了源码 |
长沙的,怎么改的大佬,那不是还要将源码copy下来去改他的 |
是的,改动有点麻烦 一时半会说不清,这个库感觉是没人维护了 |
是的,但是没有更好的库了貌似, 还有更好的库推荐吗, 或者大佬能把你改动的地方给我看看吗 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm currently facing an issue with the react-docgen-typescript tool where it fails to correctly display the attributes of a custom type, such as Tag, in the generated documentation. Instead of showing the detailed structure of the type, it simply displays 'Tag'.
Steps to Reproduce:
1.Define a custom type like this:
type Tag = {
text: string,
value: number
};
2. Use this custom type in a component's props:
interface ButtonProps {
tag: Tag;
}
3. Set the parser:
const parser =docgen.withDefaultConfig({
savePropValueAsString: true,
shouldExtractLiteralValuesFromEnum: true
});
Expected Behavior:
The documentation generated by react-docgen-typescript should accurately display the structure of the custom type Tag, including its properties and their descriptions.
Actual Behavior:
The documentation incorrectly displays 'Tag' instead of providing detailed information about the Tag type.
{
defaultValue: null,
description: '',
name: 'tag',
parent: undefined,
declarations: [
{
fileName: 'emrn-ui/emrn-ui/components/ActionSheet/ActionSheetProps.ts',
name: 'TypeLiteral'
}
],
required: true,
type: { name: 'Tag' }
}
The text was updated successfully, but these errors were encountered: