Invalid error produced between super and child classes
- Dominant language
- Rust
- Stars
- 22.3k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
Flow version: 0.96
## Expected behavior
Correct typing enforced and valid errors produced between super and child classes that together form a React component.
## Actual behavior
An invalid error is reported. Expectation is that flow reports a "missing argument" error on line 15 (refer to try-flow snippet attached) but instead reports "missing property".
Also:
1. the base class requires long winded annotations of the props and state attributes each time these are referenced; ie. `componentDidUpdate(prevProps: P & BaseProps): void`. Is there any way to simplify this?
1. I couldn't make the spread operator work; the form `{ ...P, ...BaseProps }` errors out. Shouldn't this be the preferred form over the intersection operator?
* Link to Try-Flow or Github repo:
[Try-Flow link](https://flow.org/try/#0PTAEAEDMBsHsHcBQiCWBbADrATgF1AFSgCGAzqAEoCmxAxvpNrGqAOTY32sDcyuAnhiqgAQmSoAFJhnIBeUAG9QAI3EBZKrgAWsACYAuUADsArmmVVsoWQD5QAN1gpdoAL6IBQ0eIDKuYrjC8kqqpFQAgri42Iak0ShGAOZuyLTQZORiYaAAPBIANKA+dlQAHoFGuuTUdLgAdBImHADCzFhGVEb4eaAAZN5hUrAyhT59A1R+AVR2CoigoLSwRnHYJvQ4ABQY0qSGEuNZkruFS11luIbERvyFcdOGPgCUivMLoKQmQtjbu0+871A2hQpDq90C1lAAHllAArKj0OoZFCJIybELiSLRQysSCwWCsVx3fyBf5vdwLN5LTDLTq4AAizgAqhhdNNflR7EMZPtDuJuaQnoZHM5XoDgaCdsNQaEqBptHpNv9QCBQAl7MRoKLLEwYqA0CDSAlkglQBI3gtVQAxHCgDiQSydWhUQraYR46BweDG0BS3TrKjkN2gMpCehUFwAIgNpCNSRI2ESZjpkZD2F1oAtQK0ILqcFomvlOl0St4WYldSlMjqsqLioAjAAmADMytVsAA1uWc5LdjX1Jpi5tcfjWG2wJ3YvF4yC1UZqRgAihlNBhN7tMYzBZsOTkAt84XB4riInDKZzJYhQ4nC45oCzqRYKu87BEpsK+CqHV1ZrnFjsOOoCTsYsD4IueBAZA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