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
In my tsconfig.json, set "noUncheckedIndexedAccess": true
run npx tsc
It fails with 37 errors across 9 files.
It appears your npm releases (10.0.0-alpha.23 is the one I'm using now) include .ts and .tsx files. This is bad practice for a few reasons, namely package size and inappropriate type-checking. See this comment from the Microsoft TS team lead about why this inappropriate type-checking is happening: microsoft/TypeScript#44205 (comment)
In order to fix this issue, I believe you'd need to create a dist folder that contains the compiled code, rather than releasing your entire codebase as an npm package.
I would like to keep my tsconfig's "noUncheckedIndexedAccess": true so I hope you can create a dist for future releases.
Thank you! We @wwoof really appreciate your work and are enjoying using this library thus far!
Cheers,
Cash
The text was updated successfully, but these errors were encountered:
Hey @cashc, Thanks for opening theis issue. @KiwiKilian and I were just discussing this the other day. We'll work to get this issue resolved before we cut 10.0.0.
KiwiKilian
changed the title
npm release contains typescript files
Add react-native-builder-bob to ship bundled code instead of TypeScript
Nov 15, 2024
Hi there!
Steps to reproduce this issue in my project:
maplibre-react-native
"noUncheckedIndexedAccess": true
npx tsc
It appears your npm releases (10.0.0-alpha.23 is the one I'm using now) include .ts and .tsx files. This is bad practice for a few reasons, namely package size and inappropriate type-checking. See this comment from the Microsoft TS team lead about why this inappropriate type-checking is happening: microsoft/TypeScript#44205 (comment)
In order to fix this issue, I believe you'd need to create a
dist
folder that contains the compiled code, rather than releasing your entire codebase as an npm package.I would like to keep my tsconfig's
"noUncheckedIndexedAccess": true
so I hope you can create adist
for future releases.Thank you! We @wwoof really appreciate your work and are enjoying using this library thus far!
Cheers,
Cash
The text was updated successfully, but these errors were encountered: