Add an experimental tools-typescript package for better react-native builds with typescript#3503
Merged
JasonVMo merged 37 commits intomicrosoft:mainfrom Feb 5, 2025
Merged
Conversation
tido64
approved these changes
Feb 3, 2025
tido64
requested changes
Feb 3, 2025
Member
tido64
left a comment
There was a problem hiding this comment.
Sorry, didn't mean to approve this already.
Collaborator
Author
No worries, wouldn't submit without hearing back anyways. I just submitted changes in response to your comments. Two still warrant a bit of discussion. |
Apply some of the PR feedback directly Co-authored-by: Tommy Nguyen <4123478+tido64@users.noreply.github.com>
tido64
reviewed
Feb 4, 2025
tido64
approved these changes
Feb 5, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
A package that helps with building typescript, particularly for react-native. It
leverages the @rnx-kit/typescript-service package to build using the language
service rather than using the compiler directly. This allows for custom
resolution strategies (among other things). The compilation and type-checking
are still done by typescript but this drives some convenient custom
configurations.
In particular the
buildTypescriptcommand can do things like:at the same time. The files will be split such that the minimal build can be
performed.
configs or react-native.config.js settings.
unresolved reference errors.
process.
Motivation
The current story for building typescript for react-native is sub-par, and
typescript itself is particularly restrictive with module resolution. This
addresses the ability to build react-native better right now, but also creates a
framework for experimenting with different resolvers.
Test plan