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
Fix Property types don't show up #1563
Conversation
Default: Required | ||
Description:" | ||
`); | ||
describe('flowType', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved the tests for the flowType
by wrapping describe
Codecov Report
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the pull request!
) { | ||
const props = parse( | ||
` | ||
// @TypeScript |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment doesn't mean anything in TypeScript and will confuse readers.
}); | ||
}); | ||
|
||
describe('TypeScript', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any difference between Flow and TypeScript test cases?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, there is some different output. and I also added for the unknown type for the TypeScript.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But the input is the same for all but unknown? Can we use describe.each
here to merge them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool. I didn't have this idea. Let me try once.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah sorry, the input has a bit different.
I made to be able to inject preparatory code into test components for TypeScript.
I probably can merge them, do you still want me to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you show an example? I believe we want to test very similar things, so merging makes sense. But maybe the difference is too big? ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only here is different. the difference is not too big, so I probably can merge them.
[ | ||
'flowType', | ||
renderFlow, | ||
{ enum: { declaration: "type MyEnum = 'One' | 'Two'", expect: { type: 'enum' } } }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I use the same renderFlowType
(Now the name has changed to renderAdvancedType
) for each.
Regarding rendering result, only different is the part of "enum". other types have the same result.
@sapegin please review me again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, thanks!
🎉 This PR is included in version 11.0.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Resolve
I organize react-docgen prop type(Named
PropDescriptor
) to haveflowType
andtsType
both and I remove "WithFlow" word from the types.review me please.