A framework for building native applications using React
fix(types): add missing standard properties to URL and URLSearchParams (#54787)
Summary: This PR related to issue https://github.com/facebook/react-native/issues/54789 updates the `URL` and `URLSearchParams` definitions in `globals.d.ts` to include missing standard properties and methods that are already supported by the runtime implementation. **Motivation:** I noticed that while the runtime supports standard URL operations (backed by `whatwg-url`), the TypeScript definitions were incomplete, causing unnecessary type errors when using standard Web APIs. ## Changelog: [GENERAL] [FIXED] - Added missing standard properties to `URL` (hash, host, pathname, etc.) and methods to `URLSearchParams` (get, set, delete, etc.). Pull Request resolved: https://github.com/facebook/react-native/pull/54787 Test Plan: 1. Open `globals.d.ts`. 2. Verify that `URL` interface now includes all standard properties. 3. Verify that `URLSearchParams` interface now includes all standard methods. 4. Verify that no new TypeScript errors are introduced. Screenshot: Before making changes <img width="1512" height="982" alt="Screenshot 2025-12-04 at 11 38 58 PM" src="https://github.com/user-attachments/assets/1b3bd18e-0f3e-476c-824f-a6b537092755" /> After making changes ![Uploading Screenshot 2025-12-04 at 11.39.42 PM.png…]() Reviewed By: javache Differential Revision: D88517037 Pulled By: alanleedev fbshipit-source-id: 9225b86e134be27dac7b135370de5266d414afb4
M
Manish Balayan committed
f97b9a521d6a1cd6141c39253267d26f4d0b359f
Parent: dc73ec4
Committed by meta-codesync[bot] <215208954+meta-codesync[bot]@users.noreply.github.com>
on 12/8/2025, 11:48:03 PM