The flow-upgrade tool deletes comments between class definition and props declaration
- Dominant language
- Rust
- Stars
- 22.3k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
Bug: The `flow-upgrade` tool deletes comments between class definition and props declaration.
Version information:
```
grep flow-upgrade package.json
"flow-upgrade": "^1.0.4",
```
To reproduce this behaviour, create the following file:
```
/* @flow */
import React from 'react';
export class CviBiomarkerFactId extends React.PureComponent {
/** Some comment I want to keep here. */
props: {
id: string,
ui_label?: string,
};
}
```
then run `yarn create flow-upgrade`, which will result in the following file:
```
/* @flow */
import * as React from 'react';
export class CviBiomarkerFactId extends React.PureComponent<{
id: string,
ui_label?: string,
}> {}
```
Note that it ate the comment.
Contributor guide
Assessment
This issue has not been assessed yet.