Skip to content

Type the LogBox URL matcher's exec result as RegExpExecArray - #59736

Merged
meta-codesync[bot] merged 1 commit into
mainfrom
export-D128877320
Nov 1, 2026
Merged

meta-codesync[bot] merged 1 commit into
mainfrom
export-D128877320

Conversation

@SamChou19815

Copy link
Copy Markdown
Member

Summary:
LogBoxMessage stores regex.exec(...) results in a local annotated as RegExp$matchResult, Flow's alias for RegExpMatchArray (the result type of String#match). Annotate it with RegExpExecArray, the type exec returns. That stays correct once RegExpMatchArray's index and input become optional, as in TypeScript's library. Nothing changes at runtime.

Changelog: [Internal]

Differential Revision: D128877320

Summary:
`LogBoxMessage` stores `regex.exec(...)` results in a local annotated as `RegExp$matchResult`, Flow's alias for `RegExpMatchArray` (the result type of `String#match`). Annotate it with `RegExpExecArray`, the type `exec` returns. That stays correct once `RegExpMatchArray`'s `index` and `input` become optional, as in TypeScript's library. Nothing changes at runtime.

Changelog: [Internal]

Differential Revision: D128877320
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 1, 2026
@meta-codesync

meta-codesync Bot commented Nov 1, 2026

Copy link
Copy Markdown

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

@facebook-github-tools facebook-github-tools Bot added p: Facebook Partner: Facebook Partner labels Nov 1, 2026
@meta-codesync
meta-codesync Bot merged commit b23e9a2 into main Nov 1, 2026
98 checks passed
@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @SamChou19815 in b23e9a2

When will my fix make it into a release? | How to file a pick request?

@react-native-bot react-native-bot added the Merged This PR has been merged. label Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants