Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Property 'Measure' does not exist on type 'typeof control' in Angular CLI #173

Open
satas12825 opened this issue Jul 22, 2022 · 2 comments

Comments

@satas12825
Copy link

Property 'Measure' does not exist on type 'type of control' in Angular CLI i don't no how to import in Angular

@RatebSAYAH
Copy link

Hello @satas12825, i have the same issue, did you find a solution please?

@bsoviedo
Copy link

bsoviedo commented Mar 13, 2023

Hi @satas12825 and @RatebSAYAH . I know it's a little bit late, but the issue its pretty simple to work.

You just have to add the types to the project, i really dont know if they are defined for this plugin, but generally with an npm install @types/leaflet-measure should make it work (if they are defined in some place).

If they are not defined, one alternative, you can work in that by adding manually the types,

file: yourTypesFile.d.types

declare namespace L{
export function yourFunction(args..):returns...
}

you could declare all the types if you want, and then just import the types in your map

import './yourTypesFile.d.types'

and that should let you work, in the example, you just declared the types for a function will be called as L.yourFunction(). Same logic must be applied when working with leaflet-measure

I know there must be another options configuring webpack and so on, but this is pretty simple and allows you to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants