You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 25, 2022. It is now read-only.
Is there a way for me to view all of the type errors in a NX React Native app? When running the React app or the Node app, NX automatically runs the type checker when running nx serve, but it doesn't do the same when running nx start for my React Native app.
Do I need to use tsc? What's the proper configuration for that?
The text was updated successfully, but these errors were encountered:
We rely on the metro bundler and the corresponding babel metro preset to transpile TypeScript. There might be a way to tweak it to not do transpile only, but also type check.
Then you can run npx nx typecheck my-app during CI, and rely on your IDE (VSCode or IntelliJ to check locally).
There are some issues making it hard to get tsc to work fully with React Native. For example, it cannot resolve platform specific files like foo.android.tsx vs foo.ios.tsx so it wouldn't be good to force typechecks everywhere just yet.
Just a quick update, we are still looking into this but we have a few higher priority items in the works right now (including moving this repo back into the main Nx monorepo).
I'm doing the above and running tsc through @nrwl/workspace:run-commands (thanks for the suggestion!), but:
A) not sure what is the right way to use tsc with the tsconfig.app.json and tsconfig.spec.json setup. If I do tsc -b tsconfig.json, any type errors show up twice.
B) run-commands removes the formatting from the output of tsc, so it's a lot less legible than running tsc directly
Appreciate if you have any advice :)
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Is there a way for me to view all of the type errors in a NX React Native app? When running the React app or the Node app, NX automatically runs the type checker when running
nx serve,
but it doesn't do the same when runningnx start
for my React Native app.Do I need to use
tsc
? What's the proper configuration for that?The text was updated successfully, but these errors were encountered: