Files
react-native/types/modules
Sebastian Silbermann 8568b93733 react-native: Use number literals in TypeScript types for FileReader and XMLHttpRequest states (#36000)
Summary:
Mostly to improve compat in codebases where `lib.dom.d.ts` is loaded alongside RN. TS 5.0 updates to `lib.dom.d.ts` added number literals for these states as well so the abstract `number` type from RN was no longer compatible.

Forward-port of https://github.com/DefinitelyTyped/DefinitelyTyped/pull/64144

Underlying flow types:
- https://github.com/facebook/react-native/blob/v0.71.1/Libraries/Blob/FileReader.js#L33-L35
- https://github.com/facebook/react-native/blob/v0.71.1/Libraries/Network/XMLHttpRequest.js#L54-L58

## Changelog

[GENERAL] [CHANGED] - Use number literals in TypeScript types for `FileReader` and `XMLHttpRequest` states

Pull Request resolved: https://github.com/facebook/react-native/pull/36000

Test Plan: - [x] https://github.com/DefinitelyTyped/DefinitelyTyped/pull/64144 green

Reviewed By: christophpurrer

Differential Revision: D42849886

Pulled By: jacdebug

fbshipit-source-id: c3cf2ac4f5f53ab889a9190583486da4627d3dcc
2023-01-30 15:13:31 -08:00
..