Code Monkey home page Code Monkey logo

Comments (5)

aviklai avatar aviklai commented on June 4, 2024

@argarner Hi,

I upgraded the peer dependencies and released a new version - 2.0.6.
Can you please check it out?

from react-leaflet-google-layer.

argarner avatar argarner commented on June 4, 2024

Thanks for the quick response @aviklai! Unfortunately, I'm still seeing the typescript conflicts with the ReactLeafletGoogleLayer component.

Type '{ apiKey: string; type: string; styles: ({ featureType: string; stylers: { saturation: number; }[]; } | { featureType: string; elementType: string; stylers: { visibility: string; }[]; })[]; }' is not assignable to type 'IntrinsicAttributes & LayerProps & IProps & RefAttributes<GridLayer>'.
  Property 'type' does not exist on type 'IntrinsicAttributes & LayerProps & IProps & RefAttributes<GridLayer>'.ts(2322)

On deeper inspection, we were previously on "react-leaflet-google-layer": "^2.0.4", so it looks like this change in import back in Feb may have made the googlemutant types inaccessible to consumers (used to resolve interface gridLayer.GoogleMutantOptions, but is now showing as any)?

I don't know enough about typescript type/library packaging to know why. Maybe:

  1. Outdated dependencies? Latest are npm i @types/[email protected] @googlemaps/[email protected]

  2. Deprecated devDependency? @types/googlemaps was deprecated last year, and is now @types/google.maps.

  3. Due to the change in import back in Feb, is there another way to force the bundling of @types/leaflet.gridlayer.googlemutant types for upstream consumers?

  4. Is it possible the issue stems from the leaflet.gridlayer.googlemutant pkg and it needing an update due to the release of leaflet 1.8?

  5. Otherwise, many of the devDependency types are outdated (.e.g "@types/react": "^16.8.7"), but I can't see how they would be the cause...

from react-leaflet-google-layer.

argarner avatar argarner commented on June 4, 2024

If I silence the typescript error with // @ts-expect-error our app appears to render fine, but bouncing around different map views in our storybook indicates there is a new issue with GoogleMutant and it's [email protected] compatibility, that we have not seen previously.
image

from react-leaflet-google-layer.

argarner avatar argarner commented on June 4, 2024

FYI I've just raised a new issue on the googlemutant add-on, related to leaflet 1.8.0 compatibility.

from react-leaflet-google-layer.

aviklai avatar aviklai commented on June 4, 2024

@argarner Hi,

Regarding the typescript issue, are you importing the library the following way?
import ReactLeafletGoogleLayer from 'react-leaflet-google-layer';

And can you please create a codesansbox that reproduces your typescript issue?
Because I am not able to reproduce it.

from react-leaflet-google-layer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.