MetaCell / MetaCell/geppetto-meta
Read props from typescript files
- Dominant language
- JavaScript
- Stars
- 6
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
In order to get the props we are using [react-docgen](https://github.com/reactjs/react-docgen), which in theory should work with typescript:
> If you are using flow or typescript then react-docgen can also extract the type annotations.
In reality, parsing FlexLayout [Layout.tsx](https://github.com/openworm/geppetto-client/blob/splitRefactoring/geppetto-ui/src/components/flex-layout/src/view/Layout.tsx) currently is not working with an error occurring at [this line](https://github.com/MetaCell/geppetto-website/blob/development/geppetto-showcase/components/showcase/ShowcaseUtils.js#L75).
In order to surpass this problem a dummy js file called [FlexLayoyt.Layout.js](https://github.com/openworm/geppetto-client/blob/feature/252/geppetto-ui/src/components/flex-layout/showcase/FlexLayout.Layout.js) was created to define the proptypes in a standard react/javascript format.
Ideally that would not be necessary, and that's the reason of this card.
Depends on #2
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at components/showcase/ShowcaseUtils.js line 75 and inspect how it invokes react-docgen for geppetto-ui/src/components/flex-layout/src/view/Layout.tsx. Compare the workaround in geppetto-ui/src/components/flex-layout/showcase/FlexLayout.Layout.js, accounting for the dependency on issue #2. Done means Layout.tsx can be parsed for props without the dummy JavaScript file.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react, typescript
- Domain
- frontend, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100