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
Found 8 errors in 1 file.
Errors Files
8 node_modules/@rnmapbox/maps/src/components/Camera.tsx:450
Expected behavior
Changes to project local typescript configuration should not impact files imported from node_modules
Notes / preliminary analysis
Possible Solution
Update paddingConfig type declaration:
Change the type from number | number[] to number | [number, number] | [number, number, number, number]. This ensures a stricter type safety as only these specific array lengths are meaningful and expected in the context of the Camera component.
Enable noUncheckedIndexedAccess for the project:
By enabling this flag for the entire project, similar issues can be prevented in future development cycles, enforcing stricter type checks and improving overall code robustness.
Additional links and references
There is a previously closed issue regarding this problem marked as completed: #2528
The text was updated successfully, but these errors were encountered:
@sairus2k pls include repro steps, to reproduce in a new project, to ensure it's not something in your project settings. Staring with npx @react-native-community/cli@latest init, thanks
Mapbox Implementation
Mapbox
Mapbox Version
default
React Native Version
0.75.2
Platform
iOS, Android
@rnmapbox/maps
version10.1.29
Standalone component to reproduce
Reproduction repo
Observed behavior and steps to reproduce
npx @react-native-community/cli@latest init
@rnmapbox/maps
"noUncheckedIndexedAccess": true
totsconfig.json
cameraRef
prop. Examplenpx tsc --noEmit
Expected behavior
Changes to project local typescript configuration should not impact files imported from node_modules
Notes / preliminary analysis
Possible Solution
Update
paddingConfig
type declaration:Change the type from
number | number[]
tonumber | [number, number] | [number, number, number, number]
. This ensures a stricter type safety as only these specific array lengths are meaningful and expected in the context of the Camera component.Enable
noUncheckedIndexedAccess
for the project:By enabling this flag for the entire project, similar issues can be prevented in future development cycles, enforcing stricter type checks and improving overall code robustness.
Additional links and references
There is a previously closed issue regarding this problem marked as completed: #2528
The text was updated successfully, but these errors were encountered: