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

TypeScript support for react-native #1273

Closed
2 tasks done
afoxman opened this issue Mar 20, 2022 · 2 comments
Closed
2 tasks done

TypeScript support for react-native #1273

afoxman opened this issue Mar 20, 2022 · 2 comments

Comments

@afoxman
Copy link
Contributor

afoxman commented Mar 20, 2022

Add react-native support to TypeScript. Problem is demonstrated and explained in https://github.com/afoxman/rnts-example.

@afoxman afoxman added this to rnx-kit Mar 20, 2022
@afoxman afoxman self-assigned this Mar 20, 2022
@afoxman afoxman moved this to 🌳 Backlog in rnx-kit Mar 20, 2022
@afoxman
Copy link
Contributor Author

afoxman commented May 10, 2022

Followup: What's missing now is getting types for the target platform when the import/require is for 'react-native' (e.g. react-native-windows, which has types in its core package).

Met with the TypeScript team, and it sounds like we can get this without further TS core changes. Rough plan is to move everything to @types packages and use existing path/baseurl mapping to make it work. Andrew Branch is going to help when I find time to dig in further. One big step that he pointed out is the need to avoid "links" between types packages -- e.g. RNW types import RN types. This won't work with the remapping system. This means moving every RN platform to its own @types/... package.

@tido64 tido64 added feature: metro This is related to Metro and removed feature: metro This is related to Metro labels Feb 15, 2023
@tido64
Copy link
Member

tido64 commented Jul 21, 2023

react-native is now shipping types.

@tido64 tido64 closed this as completed Jul 21, 2023
@github-project-automation github-project-automation bot moved this from 🌳 Backlog to ✅ Done in rnx-kit Jul 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants