bad property not found error related to spread props, object intersections, and import type order
- Dominant language
- Rust
- Stars
- 22.3k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
Flow 0.36.0
`temp1.js`
```es6
// @flow
export type BaseAxisProps = {
side: string,
}
export type AxisProps = BaseAxisProps & {
range: Array
}
```
`temp2.js`
```es6
// @flow
import type {AxisProps, BaseAxisProps} from './temp1'
// if you use this order instead, the error goes away!
// import type {BaseAxisProps, AxisProps} from './temp1'
type UncontrolledAxisProps = BaseAxisProps & {defaultRange: Array}
function convert(axis: UncontrolledAxisProps): AxisProps {
return {
...axis,
range: axis.defaultRange,
}
}
```
```
temp1.js:7
7: export type AxisProps = BaseAxisProps & {
^^^^^^^^^^^^^ property `side`. Property not found in
11: return {
^ object literal. See: temp2.js:11
```
Contributor guide
Assessment
This issue has not been assessed yet.