pasha-mf

Results comments of pasha-mf

I don't seem to be able to make it work (running Flow 0.14.0). Here's my test case: ``` /* @flow */ type P = { width: number; }; class Label...

Ok, but even after adding the declaration for `defaultProps` it still doesn't complain about `width` being a string...

@frankychung @cloudkite Isn't this bizarre? I just tested Franky's piece: create a new directory, do `flow init` in that directory, create file `test.js` (has to have extension .js) and paste...

I believe this is a different issue: the problem is not in accessing possibly non-existent property (x), but in accessing it on a possibly undefined object (obj). The code as...

Well, `replaceState` would have been a nice alternative, except that it gives ``` Warning: replaceState(...) is deprecated in plain JavaScript React classes. Refactor your code to use setState instead (see...

It looks like even simplest comparisons fail to refine: ``` // @flow type Period = "year" | "month" | "day"; function cast(s: string): ?Period { if (s === "year") {...

Another example of the same issue occurs when using switch statements: ``` /* @flow */ type Color = "blue" | "yellow" | "red"; function test(color: Color) { switch (color) {...

The value of this pattern for me is to be able to convert an arbitrary string variable into an enumeration of fixed string symbols. For example suppose in your class...