Closed bebraw closed 9 years ago
This should now be supported, it wasn't related to constructor functions, we just didn't support that kind of object syntax, now we do :)
@phpnode Thanks a lot! This worked very nicely. Is there any compelling reason to use flowcheck anymore?
yes, flow can catch a lot more errors before the program actually runs whereas our static analysis is very rudimentary. They complement each other.
The plugin works perfectly with functions. Unfortunately I ran to a glitch with class constructors. To keep it simple I have a declaration like this:
If I pass something else than string as a name, it doesn't fail as I expect. I know flowcheck can deal with this case but I'm actually looking at your tool as a replacement.
You can find a runnable example at https://github.com/survivejs/webpack_react/tree/typecheck-glitch .
Let me know if you need further information.