mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
8ba22587b5
Expand type inference to infer mixedReadOnly types for numeric and computed property accesses.
```js
function Component({idx})
const data = useFragment(...)
// we want to type `posts` correctly as Array
const posts = data.viewers[idx].posts.slice(0, 5);
// ...
}
```