Closed veno501 closed 2 months ago
Same issue, also tried to suppress them with a patch but to no success.
disabling strict mode makes these go away, but we aren't planning on doing that for our pipelines
Hey @veno501, @madmeatballs, this should be resolved in 10.0.0-alpha.9. Feel free to reopen if the problem persists. Thanks!
@tyrauber with 10.0.0-alpha.9 I am still getting some TS errors
node_modules/@maplibre/maplibre-react-native/javascript/components/HeadingIndicator.tsx(4,25): error TS2307: Cannot find module '../../assets/heading.png' or its corresponding type declarations. node_modules/@maplibre/maplibre-react-native/javascript/utils/geoUtils.ts(1,25): error TS7016: Could not find a declaration file for module '@mapbox/geo-viewport'. '/Users/name/Documents/xxx/xx/mobile-app/node_modules/@mapbox/geo-viewport/index.js' implicitly has an 'any' type. Try
npm i --save-dev @types/mapbox__geo-viewport
if it exists or add a new declaration (.d.ts) file containingdeclare module '@mapbox/geo-viewport';
@veno501 how did you manage to suppress these?
@tyrauber with 10.0.0-alpha.9 I am still getting some TS errors
node_modules/@maplibre/maplibre-react-native/javascript/components/HeadingIndicator.tsx(4,25): error TS2307: Cannot find module '../../assets/heading.png' or its corresponding type declarations. node_modules/@maplibre/maplibre-react-native/javascript/utils/geoUtils.ts(1,25): error TS7016: Could not find a declaration file for module '@mapbox/geo-viewport'. '/Users/name/Documents/xxx/xx/mobile-app/node_modules/@mapbox/geo-viewport/index.js' implicitly has an 'any' type. Try
npm i --save-dev @types/mapbox__geo-viewport
if it exists or add a new declaration (.d.ts) file containingdeclare module '@mapbox/geo-viewport';
@veno501 how did you manage to suppress these?
I declared these myself, see https://github.com/maplibre/maplibre-react-native/issues/422#issuecomment-2230642658
We use this library and since version 10.0.0-alpha.7, it triggers new typescript errors inside the node_modules of our project, which is a little annoying as it breaks the typescript checks in our pipeline. I can't figure out how to suppress them without editing the files in node_modules/@maplibre
Steps to Trigger Behavior
npm install
npx tsc --noEmit
Expected Behavior
Typescript check is successful
Actual Behavior
Typescript check throws eight errors in javascript/components/Style.tsx
Screenshots (if applicable)
Version(s) affected
Additional context
Since previous versions, there have been other typescript errors when importing this npm package. Specifically,
Cannot find module '../../assets/heading.png'
andCould not find a declaration file for module '@mapbox/geo-viewport'
. These I've managed to suppress by declaring the required modules, but this one I don't know how to deal with