Commit a5235e3
committed
flow: Upgrade to Flow v0.141.0
This version fixes a bug I've noticed regularly, and am glad to see
gone:
Improved inference of chained generic method calls, such as `Array`
methods. For example, given `[1, 2].map(a => a).forEach(b => b)`,
Flow now infers that `b` is a `number` rather than `any | number`.
https://github.com/facebook/flow/blob/main/Changelog.md#01400
This happens in a number of places in our codebase; the `userIds`
local in `pmUnreadsKeyFromMessage` is the first one I find just now
when I go look for one.
I believe this hasn't been likely to conceal type errors (and indeed
fixing it didn't reveal any.) That's because the `| number` means
that anything consuming that data still needs to be prepared to handle
a `number`. But it is disconcerting to have those `any`s showing up
regularly when inspecting types in the IDE, and good to have that fixed.1 parent faeda08 commit a5235e3
3 files changed
+6
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
| 142 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5368 | 5368 | | |
5369 | 5369 | | |
5370 | 5370 | | |
5371 | | - | |
5372 | | - | |
5373 | | - | |
5374 | | - | |
| 5371 | + | |
| 5372 | + | |
| 5373 | + | |
| 5374 | + | |
5375 | 5375 | | |
5376 | 5376 | | |
5377 | 5377 | | |
| |||
0 commit comments