-
Notifications
You must be signed in to change notification settings - Fork 6.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[expo]: Add types folder to published package #31339
Conversation
The Pull Request introduced fingerprint changes against the base commit: df216d9 Fingerprint diff[
{
"op": "changed",
"source": {
"type": "dir",
"filePath": "../../node_modules/expo",
"reasons": [
"bareRncliAutolinking"
],
"hash": "41d8db5d77625f15779c4d1ded50d4a28736a822"
}
},
{
"op": "changed",
"source": {
"type": "dir",
"filePath": "../../packages/expo",
"reasons": [
"expoAutolinkingIos",
"expoAutolinkingAndroid",
"expoConfigPlugins",
"expoConfigPlugins"
],
"hash": "a34dbe8f85b79ebb2d509e5009e10f70e7c5bf58"
}
}
] Generated by PR labeler 🤖 |
Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me but @byCedric mentioned some concern that whether these types are internal and should not publish publicly. please double check if we need all these types publicly. see https://exponent-internal.slack.com/archives/C5ERY0TAR/p1725439343314989?thread_ts=1725411493.294319&cid=C5ERY0TAR
I don't consider any of these types internal. These are not types for the |
it looks like we've tried to override react-native types:
not sure if that would conflict with react-native types? |
@Kudo You cannot override with TypeScript, interfaces are always merged. If there is a conflict (e.g impossible to satisfy unions), TypeScript will error and fail to compile. For example, with these changes |
cool, thanks for clarifying that. |
Why
Add
types
folder topackage.json
. This folder should be included for better typing in Expo Web.Running the CLI with TypeScript enabled will create a
expo-env.d.ts
that references this folder. This has gone unnoticed as there is no warning/error and these types are additive (and also supplied by router) but VS Code now has a warning that the folder is missing.Fixes #31250
How
Test Plan
Checklist
npx expo prebuild
& EAS Build (eg: updated a module plugin).