Skip to content

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

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

SamChou19815 wants to merge 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.

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

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant