brigand / brigand/babel-plugin-flow-react-proptypes
Add support for recursive data types
- Dominant language
- JavaScript
- Stars
- 427
- Forks
- 42
- PR merge metrics
- No merged PRs in 30d
Description
The following code:
```
type NestedArray = (T | NestedArray)[];
export type Props = {
numbers: NestedArray,
};
```
produces the following error:
```
RangeError: Maximum call stack size exceeded
at Array.map ()
20 | }
21 | else if (node.type === 'UnionTypeAnnotation') {
> 22 | const realTypes = node.types.map(n => mapGenericToRealType(n, typeParamMapping));
| ^
23 | const newNode = Object.assign({}, node, {
24 | types: realTypes,
25 | });
at map (src/convertToPropTypes.js:22:34)
...
```
Contributor guide
Assessment
This issue has not been assessed yet.