Closed mgoldsborough closed 7 years ago
The only change introduced in 2.2.2
is the addition of typescript bindings (the .d.ts
file that is mentioned in your errors).
Are you using typescript?
@atstp yep, we are using typescript v2.3.4
Have you tried using leaflet 1.2.0 ?
let me take that back - your type definition file doesn't working with latest leaflet 1.2.0 - works with 1.0.66
@sgentile, are you referring to the EasyButton type definitions?
EasyButton's .d.ts
file was contributed by the community (pinging @teyc); I'm not a typescript user myself. Regardless, I'd like to make sure that it all works smoothly and it seems like the workaround right now to pin at 2.2.0
, just before the typescript definitions were added — not ideal.
As typescript users, do you guys have any hints as to why these errors are showing up or how to fix them? are you using any other leaflet plugins with typescript definitions that we could reference?
@atstp These errors are showing up because Typescript is a strongly typed language, and if it spots incompatible function definitions etc, it will complain ahead of time. Sounds like leaflet typings 1.2.0
has made significant changes to the API. https://github.com/DefinitelyTyped/DefinitelyTyped/commit/b5eaa88e9effe4eebf076951217bdaf3be861721#diff-e215c0498649a65783e8d1347a88e640L1308
This is going to be somewhat painful to resolve. Any suggestions what to do with such big changes?
Thanks teyc.
For now, I'll add a note to the readme. From what you guys have seen, is it correct to say that:
EasyButon's type definitons work with
leaflet@1.0.66
and below; for compatibility with the latest leaflet pinleaflet-easybutton
to2.2.0
(for which aren't type definitions)
after that, we can address updating EasyButton's bindings at whatever speed works well for us. All of my typed js work right now is through bucklescript, but if i get the chance to do some typescript work i'll take the opportunity and update EasyButton.
In the meantime, if anyone from the community can updated the type definitions, I, along with the ret of the community, would appreciate it!
should be fixed with release v2.2.3
Hello,
I recently cleaned out my
node_modules
folder and reinstalled them vianpm install
. Prior to the update I hadv2.2.0
. After the update I was providedv2.2.2
.I'm now unable to build my project which utilizes leaflet v1.0.3.
Here's my dependency block:
And the output of
npm ls -depth 0 leaflet leaflet-easybutton
:And here are the build errors:
If I lock
leaflet-easybutton
tov2.2.0
, everything works fine.Any thoughts on what would be the issue?