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
I’m have a NX monorepo with 1 app (my-app) and 1 lib (products).
The products lib has the noUncheckedIndexedAccess tsconfig property set to false in its libs/products/tsconfig.json file.
The my-app app has the noUncheckedIndexedAccess tsconfig property set to true in its apps/my-app/tsconfig.json file.
In the products lib I have this component being exported:
exportfunctionProducts(){constmyArr=[1,2,3];constindex: number=0;constvalue=myArr[index];return(<div>{/* I don't need the optional operator because this project has noUncheckedIndexedAccess = false */}<h1>{value.toString()}</h1></div>);}
libs/products/src/lib/products.tsx:11:12 - error TS18048: 'value' is possibly 'undefined'.
11 <h1>{value.toString()}</h1>~~~~~
Found 1 error in libs/products/src/lib/products.tsx:11
Package Manager Version
pnpm 9.1.0
Operating System
macOS
Linux
Windows
Other (Please specify)
Additional Information
No response
The text was updated successfully, but these errors were encountered:
Current Behavior
I’m have a NX monorepo with 1 app (my-app) and 1 lib (products).
The products lib has the
noUncheckedIndexedAccess
tsconfig property set to false in itslibs/products/tsconfig.json
file.The my-app app has the
noUncheckedIndexedAccess
tsconfig property set to true in itsapps/my-app/tsconfig.json
file.In the products lib I have this component being exported:
And I importing it to my-app:
When I run
tsc
command to type check my-app it’s throwing an error:libs/products/src/lib/products.tsx
) that’s outside my-app?tsconfig.json
file?Yes, I have the
"skipLibCheck": true
in mytsconfig.base.json
file.Expected Behavior
Type checking should be executed only for the files of my-app and not for its dependency libraries.
GitHub Repo
https://github.com/joel-daros/nx-tsconfig-issue
Steps to Reproduce
pnpm install
tsc
command for type checking:pnpm exec tsc --project ./apps/my-app/tsconfig.app.json --noemit
Nx Report
Failure Logs
Package Manager Version
pnpm 9.1.0
Operating System
Additional Information
No response
The text was updated successfully, but these errors were encountered: