prettier: Commas vs semicolons in Flow typings (was: Invalid code produced for Flow typings)
Having original Flow typings…
declare class ConnectedComponent<OP, P, Def, St> extends React$Component<void, OP, void> {
static WrappedComponent: Class<React$Component<Def, P, St>>;
getWrappedInstance(): React$Component<Def, P, St>;
static defaultProps: void;
props: OP;
state: void;
}
…invalid code is printed(notice ,
instead of ;
after class properties)
declare class ConnectedComponent<OP, P, Def, St> extends React$Component<
void,
OP,
void
> {
static WrappedComponent: Class<React$Component<Def, P, St>>,
getWrappedInstance(): React$Component<Def, P, St>,
static defaultProps: void,
props: OP,
state: void
}
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 17 (12 by maintainers)
Commits related to this issue
- Use semicolons in Flow interface-like bodies (#2593) Closes #2593. — committed to motiz88/prettier by motiz88 7 years ago
- Merge pull request #2888 from motiz88/fix-2593 Use semicolons in Flow interface-like bodies (#2593) — committed to prettier/prettier by suchipi 7 years ago
- Use semicolons in Flow interface-like bodies (#2593) Closes #2593. — committed to Automattic/wp-prettier by motiz88 7 years ago
As far a I can tell, the commas are not invalid, but I guess semicolons would be more expected here.