typescript type definition for Leaflet.markercluster
See original GitHub issueAn up to date (free of syntax errors) typescript definition for Leaflet markercluster is needed.
And it would be great if the definition can be included in this repo and specified in the package.json
. (See http://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html).
Currently registry:dt/leaflet-markercluster#0.4.0+20160919070725 is broken. I did some initial investigation and I believe but could be wrong that:
- It should be exporting an interface that extends
FeatureGroup
. A class usually isn’t in a type definition because it is an implementation. Currently there is an error from typescript compiler saying a class doesn’t extend, but implements - which is true. But the problem is that it shouldn’t be a class, but rather an interface definition. FeatureGroup
is not a generic
I can look at this more, but I don’t know the API very well so it may take me more time. If someone else has solved this or can get to it before me, I’d appreciate it.
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
@types/leaflet.markercluster - npm
@types/leaflet.markercluster. TypeScript icon, indicating that this package has built-in type declarations.
Read more >@types/leaflet.markercluster | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >MarkerCluster LeafletJS plugin TypeScript definition file creation
marketcluster.ts appears to be just JavaScript code, it does not contain any TypeScript class declaration. You should create a definition file leaflet.
Read more >@types/react-leaflet-markercluster - npm package | Snyk
TypeScript definitions for react-leaflet-markercluster For more information about how to use this package see README. Latest version published 1 year ago.
Read more >Leaflet With Markercluster And Typescript - ADocLib
Leaflet.markercluster plugin provides beautiful animated Marker Clustering GitHub releases npm TypeScript definitions on DefinitelyTyped types.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello, I have a similar issue or at least related issue here. I am using
and
Code completion and everything works perfectly fine. However during compilation of
ng serve
it fails withAny ideas how to solve this?
EDIT I found the solution here: https://github.com/angular/angular-cli/wiki/stories-third-party-lib Make sure to add the types in the
src/tsconfig.app.json
, NOT thetsconfig.json
in your project folder.I’m using
and
The following worked for me: