You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AVykhrystyuk
changed the title
Flow didn't catch a call to missing property(or method) on function
Flow didn't catch a call to missing property(or method) on a function
Jun 4, 2019
Flow version: 0.100.0
Expected behavior
Flow yields an error that property 'x' is missing on a function
Actual behavior
Flow didn't catch a typo, so if that code is not covered by tests - you get a runtime error.
Link to Try-Flow or Github repo: https://flow.org/try/#0PTAEAEDMBsHsHdQGcAuAnAlgYxQKF5AK4B2OGsxoRpAFAJQBcoAbrBgCagDeuooaAUxSE0lalgB0SWAFshACwzEA5gFkMSJEuX0A3KBCgAPAFoToAA5pYFgWhQBPUAHJpclIpXrN256A2gMhpaKrgAvvjiKORiJFgATPRMxIQyAEZ23Lz8QiKxpPESAPpF0AIqHiX6hqbmVjZ2ji4lZRXyJX4BQT6hEUA
Link to how the same is handled in Typescript:
https://www.typescriptlang.org/play/index.html#src=function%20func()%3A%20void%20%7B%0A%20%20return%20func.somethingMissing()%3B%20%2F%2F%20%3C--%20property%20'somethingMissing'%20is%20missing%0A%7D%0A%0Afunction%20func2()%3A%20number%20%7B%0A%20%20return%20func2.__length__%3B%20%2F%2F%20%3C--%20property%20'__length__'%20is%20missing%0A%7D%0A
The text was updated successfully, but these errors were encountered: