Re:TypeScript 2.3
by Myrannas on Thursday April 27, 2017 @06:52PM
(#14215498)
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({});
For example:
This compiles without errors - but would fail at runtime. https://flow.org/try/#0PQKgBAAgZgNg9gdzCYAoVUCuA7AxgFwEs5swp...