Open
Description
Docs: https://flow.org/en/docs/react/component-syntax/
Code
component Example( text: string = 'Hello World' ) {
return <div>{text}</div>;
}
Expected
[
{
"description": "",
"displayName": "Example",
"methods": [],
"props": {
"text": {
"required": false,
"flowType": {
"text": "string"
},
"description": "",
"defaultValue": {
"value": "'Hello World'",
"computed": false
}
}
}
}
]
Actual
SyntaxError: playground.tsx: Missing semicolon. (1:9)
> 1 | component Example(
| ^
2 | text: string = 'Hello World'
3 | ) {
4 | return <div>{text}</div>