* Tests overriding a property via a spread, where the value is a tvar. the * type of the prop from the object that is being overridden (`x.kind` in the * case below) should //not// feed back into the tvar (`value`), since the * result is a new object.
(
x: {kind: ?string},
kinds: {[key: string]: string}
)
| 12 | * result is a new object. |
| 13 | */ |
| 14 | function test( |
| 15 | x: {kind: ?string}, |
| 16 | kinds: {[key: string]: string} |
| 17 | ): Array<{kind: ?string}> { |
| 18 | return map(kinds, (value) => { |
| 19 | (value: string); // OK |
| 20 | return { |
| 21 | ...x, |
| 22 | kind: value, |
| 23 | }; |
| 24 | }); |
| 25 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…