-
Notifications
You must be signed in to change notification settings - Fork 52
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
Typescript complain over types #35
Comments
Hey there, |
The plugins works fine, only that I don't get any intellisense in VSCode. By the way, I can't imagine how do you work without the intellisense, do you always look the documentation or you add the api to your muscle memory? |
Yeah I basically have the browser on one desktop, and another with a terminal full screen and work in there. It's small enough that I'm pretty happy that way (I do use IDE for other bigger project, but that's small enough to work like that). |
Since @technbuzz uses TypeScript, the problem can be bypassed with the use of "as any" after the marker options. Of course a better solution so you don't loose type hints for all marker options would be to use type definitions. This can be done with a file named "leaflet.bouncemarker.d.ts" and the following content. This works for me, I don't know if it is best practices or the common way to add options to an existing interface so I don't know if it is a good idea to include this in the repository: import * as L from 'leaflet';
declare module 'leaflet' {
export interface MarkerOptions extends InteractiveLayerOptions {
bounceOnAdd?: boolean;
bounceOnAddOptions?: {
duration: number,
height: number,
loop: number
};
bounceOnAddCallback?: Function;
}
} |
From what I'm reading it seems to make sense to add that file to the repo so it's there for whomever wanna use it, care to open a PR? |
@maximeh Ok, I will open a pull request. |
Add TypeScript module definition file (#35)
cual es la solución a este problema |
I don't speak Spanish but you can use the latests release if you want to have that fixed: |
Any types available for this plugin? as I am getting following error

The text was updated successfully, but these errors were encountered: