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

error TS2345 #275

Open
j-Cis opened this issue Jul 1, 2018 · 1 comment
Open

error TS2345 #275

j-Cis opened this issue Jul 1, 2018 · 1 comment

Comments

@j-Cis
Copy link

j-Cis commented Jul 1, 2018

I found an example of how to use a cluster that I really like(https://stackblitz.com/edit/angular-jbp2yc), but it only working in Stackblitz, when I tried to implement it, pop up ugly errors
the author of this example is: @aitboudad;

Steps to reproduce
on new project in Angular 6, I copied this example and just started it (after having installed the necessary items)

My Errors

Date: 2018-07-01T21:32:22.946Z - Hash: a87281cf4effd67eacc9 - Time: 3655ms
4 unchanged chunks
chunk {main} main.js, main.js.map (main) 239 kB [initial] [rendered]
i 「wdm」: Compiled successfully.
ERROR in src/app/core/markerclusterer.ts(362,19): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'.
src/app/core/markerclusterer.ts(1108,23): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'.
src/app/core/markerclusterer.ts(1109,23): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'.

I do not understand what this compiler is clinging to something, when on Stackblitz this example works

@andreipaz
Copy link

Maybe the stackblitz compiler is not so strict as in ng cli.
Did you try to just ".toString()" the value?

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

2 participants