Skip to content

Extend Iterable in ReadonlyURLSearchParams instead of declaring @@iterator - #60498

Open
SamChou19815 wants to merge 1 commit into
mainfrom
export-D135753192
Open

SamChou19815 wants to merge 1 commit into
mainfrom
export-D135753192

Conversation

@SamChou19815

Copy link
Copy Markdown
Member

Summary:
Flow is moving Symbol.iterator from the string literal '@iterator' to a unique symbol (matching TypeScript), so a member named @iterator names a string property rather than the iterator protocol.

Have ReadonlyURLSearchParams extend Iterable<[string, string]> instead of declaring @iterator(): Iterator<[string, string]>. This removes @iterator and translates cleanly to TypeScript.

Changelog: [Internal]

Differential Revision: D135753192

…@@iterator`

Summary:
Flow is moving `Symbol.iterator` from the string literal `'@iterator'` to a `unique symbol` (matching TypeScript), so a member named `@iterator` names a string property rather than the iterator protocol.

Have `ReadonlyURLSearchParams` extend `Iterable<[string, string]>` instead of declaring `@iterator(): Iterator<[string, string]>`. This removes `@iterator` and translates cleanly to TypeScript.

Changelog: [Internal]

Differential Revision: D135753192
@meta-codesync

meta-codesync Bot commented Dec 2, 2026

Copy link
Copy Markdown

@SamChou19815 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D135753192.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants