Skip to content

Pass an explicit type argument to the StatusBar props-stack reduce - #59735

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

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

Conversation

@SamChou19815

Copy link
Copy Markdown
Member

Summary:
mergePropsStack folds a StackProps array into a ResolvedStackProps accumulator, starting from a spread of the defaults. Once Flow's library adds TypeScript's reduce(callbackfn, initialValue: T): T overload, that call picks it, because the initial value is also a valid StackProps, and the accumulator becomes StackProps. Pass ResolvedStackProps explicitly so the generic overload is used. Nothing changes at runtime.

Changelog: [Internal]

Differential Revision: D128883774

Summary:
`mergePropsStack` folds a `StackProps` array into a `ResolvedStackProps` accumulator, starting from a spread of the defaults. Once Flow's library adds TypeScript's `reduce(callbackfn, initialValue: T): T` overload, that call picks it, because the initial value is also a valid `StackProps`, and the accumulator becomes `StackProps`. Pass `ResolvedStackProps` explicitly so the generic overload is used. Nothing changes at runtime.

Changelog: [Internal]

Differential Revision: D128883774
@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 D128883774.

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

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @SamChou19815 in c3856cb

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 2, 2026
@SamChou19815
SamChou19815 deleted the export-D128883774 branch November 2, 2026 18:03
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