Skip to content
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

Feat/update shim for rn 73 #8

Merged
merged 3 commits into from
May 8, 2024
Merged

Feat/update shim for rn 73 #8

merged 3 commits into from
May 8, 2024

Conversation

zibs
Copy link
Contributor

@zibs zibs commented Apr 11, 2024

Description

See commit message

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Checklist: (Feel free to delete this section upon completion)

  • I have included a changeset if this change will require a version change to one of the packages.
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have run all builds, tests, and linting and all checks pass
  • I have added tests that prove my fix is effective or that my feature works
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

RN improved the typing of StyleSheet in 0.73 (facebook/react-native@b0a9053) by removing the possibility of typos/invalid keys. It looks like dark never really accounted for that, so using dark on 0.73 causes TS squigglies due to the fact that `dark` is not a valid propery key for any styles! Somewhere along the way too, it did widen some types from being 'flex-start' to 'string' which also caused errors.

This simplifies (and hopefully doesn't break?) the shim, by mostly just lifting the new TS definition inside RN, and applying the `AddDark` type.

I tested this on `vnxl` after upgrading the example app to 0.73 and by patching packages.

Update shim.d.ts
@zibs zibs merged commit 681ce6f into main May 8, 2024
1 check passed
@zibs zibs deleted the feat/update-shim-for-rn-73 branch May 8, 2024 17:23
@github-actions github-actions bot mentioned this pull request May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants