Skip to content

metro-core: Make Flow-private fields of Terminal actually private#1579

Closed
robhogan wants to merge 1 commit into
mainfrom
export-D82028876
Closed

metro-core: Make Flow-private fields of Terminal actually private#1579
robhogan wants to merge 1 commit into
mainfrom
export-D82028876

Conversation

@robhogan

Copy link
Copy Markdown
Contributor

Summary:
_-prefixed variables are considered private in Flow, and part of the private API by convention.

This makes them actually private with the newer # prefix. In particular, this prevents _private props and methods being added to generated TypeScript types.

Though this is private, I had a search around GitHub anyway to make sure this wouldn't break anyone - the only case I can find was in Expo CLI. I've opened expo/expo#39531 to move them onto public APIs.

Changelog: Internal

Reviewed By: huntie

Differential Revision: D82028876

Summary:
`_`-prefixed variables are considered private in Flow, and part of the private API by convention.

This makes them actually private with the newer `#` prefix. In particular, this prevents `_private` props and methods being added to generated TypeScript types.

Though this is private, I had a search around GitHub anyway to make sure this wouldn't break anyone - the only case I can find was in Expo CLI. I've opened expo/expo#39531 to move them onto public APIs.

Changelog: Internal

Reviewed By: huntie

Differential Revision: D82028876
@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 Sep 11, 2025
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D82028876

@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request has been merged in c101027.

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. fb-exported Merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants