Skip to content

fix(react-native): add missing AssetRegistry TypeScript types - #58964

Open
byCedric wants to merge 2 commits into
react:mainfrom
byCedric:@bycedric/react-native/add-missing-asset-registry-types
Open

byCedric wants to merge 2 commits into
react:mainfrom
byCedric:@bycedric/react-native/add-missing-asset-registry-types

Conversation

@byCedric

@byCedric byCedric commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Summary:

#57369 moved the AssetRegistry into the public API of React Native starting from 0.87. Unfortunately, it seems that the TypeScript types were not updated to include this API, resulting in type issues when trying to use:

import { AssetRegistry, type AssetDestPathResolver, type PackagerAsset } from 'react-native'

This PR fixes the typing issues for 0.88.

The Flow types were updated correctly in 0.87-rc.0.

Changelog:

[GENERAL] [FIXED] Add missing TypeScript types for public AssetRegistry API

Test Plan:

  • Prepare any TypeScript project with React Native
  • Run type checks for:
    import { AssetRegistry, type AssetDestPathResolver, type PackagerAsset } from 'react-native'
  • Should succeed

@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 Oct 9, 2026
@byCedric
byCedric force-pushed the @bycedric/react-native/add-missing-asset-registry-types branch from f034407 to 50672a7 Compare October 9, 2026 09:49

@huntie huntie left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch, thanks!

@byCedric
byCedric force-pushed the @bycedric/react-native/add-missing-asset-registry-types branch from 50672a7 to bb4597f Compare October 9, 2026 09:55
@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Oct 9, 2026
@huntie

huntie commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

We should be able to pick this exact commit to 87 once merged.

@byCedric

byCedric commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

@huntie it might be slightly harder due to the folder rename in 0.88 (types -> types_DEPRECATED)

@byCedric
byCedric marked this pull request as draft October 9, 2026 10:45

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. p: Expo Partner: Expo Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants