Commit c5c2e4e
Seal the JSX attributes object if there is no spread
Summary:
Currently, if you try to use exact objects for react props, you get
errors about flowing inexact objects to exact objects. This diff does NOT fix
that. To fix that, we probably need to fiddle a bunch more with the complicated
react machinery.
However, the `jsx` pragma code is much more simple. So by sealing this object,
we allow the jsx function to expect an exact object type. See the test for an
example.
Reviewed By: samwgoldman
Differential Revision: D4015376
fbshipit-source-id: 9810691c1fe4601f1c0d19e10c5c75b764310e2d1 parent d0f8787 commit c5c2e4e
2 files changed
Lines changed: 31 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
275 | | - | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
276 | 305 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3496 | 3496 | | |
3497 | 3497 | | |
3498 | 3498 | | |
3499 | | - | |
| 3499 | + | |
3500 | 3500 | | |
3501 | 3501 | | |
3502 | 3502 | | |
| |||
0 commit comments