Fix #54733: Add missing URLSearchParams type definitions #54734
Closed
+49
−36
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix #54733: Add missing URLSearchParams type definitions
Summary
This PR fixes issue #54733 where the TypeScript definitions for
URLSearchParamsinglobals.d.tswere missing several methods that were recently implemented in the codebase (commit af1f1e4).The following methods have been added to the
URLSearchParamsinterface to match the implementation:delete(name: string): voidget(name: string): string | nullgetAll(name: string): string[]has(name: string): booleanset(name: string, value: string): voidsort(): voidkeys(): IterableIterator<string>values(): IterableIterator<string>entries(): IterableIterator<[string, string]>forEach(callbackfn, thisArg?): voidChangelog
[General] [Fixed] - Add missing URLSearchParams type definitions to globals.d.ts
Test Plan
This is a type definition change only. It allows TypeScript to correctly validate usage of the newly implemented
URLSearchParamsmethods.Verification:
URLSearchParamsinstance.params.get('foo')).Fixes #54733