Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 DefinitelyTyped/DefinitelyTyped#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: #36000 Test Plan: - [x] DefinitelyTyped/DefinitelyTyped#64144 green Reviewed By: christophpurrer Differential Revision: D42849886 Pulled By: jacdebug fbshipit-source-id: c3cf2ac4f5f53ab889a9190583486da4627d3dcc
- Loading branch information