Can't spread props with intersection-of-objects type
Open
bug
- Dominant language
- Rust
- Stars
- 22.3k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
This one is very much like #1329, but with JSX props spread instead of object spread:
```jsx
/* @flow */
type T = { foo: string } & { bar: string };
const Test = (props: T) => null
function bar(x: T): void {
(x.foo : string); // ok
(x.bar : string); // ok
const y = // not ok
}
```
https://flowtype.org/try/#0PQKgBAAgZgNg9gdzCYAoVAXAngBwKZgAqYAvGAN5hRxwBcYAzhgE4CWAdgOZgC+YAZBTAAjAIbN6TNl14BudAGM47JkTyqyAChzM4OBvUIBKUgD4w7AK4wY6KJfYKMrZSPGaAHoaP0AbnFYAEwpUMDBPADpqODBJFg5OI1kwYGAwOABrUPCPCLFmWMZ4riSUtMz0MKUVDDAsUjAAHkJ1WvIIjo8+YHNUizhaip4gA
I guess it should be added to #1331 as well
Contributor guide
Assessment
This issue has not been assessed yet.