|
|
|
|
|
by Myrannas
3344 days ago
|
|
I am not convinced that parameter type inference is a reason to use flow. I have seen examples where flow fails to report errors because it can't infer the parameter types. I would rather consistency over inference that sometimes works sometimes fails silently. For example: function fn(a) {
const {b} = a;
console.log(b.c);
}
fn({});
This compiles without errors - but would fail at runtime. https://flow.org/try/#0PQKgBAAgZgNg9gdzCYAoVUCuA7AxgFwEs5swp... |
|