eNepper / Google-Maps-TypeScript-typing

Google Maps TypeScript typing
MIT License
9 stars 18 forks source link

Visual Studio build error #6

Open Lorex75 opened 10 years ago

Lorex75 commented 10 years ago

VisualStudio reports this errore for the following classes: Error Build: Overloads cannot differ only by return type.

Marker

InfoWindow

I don't know which could be the best way to fix it

tbertran commented 10 years ago

@Lorex75 Did you get a resolution on this?

JohnBergman commented 10 years ago

I removed the duplicate, and changed the return type to Any. The problem is that Googles API could return either, so you will have to cast it on the receiving side to what you expect/want.

Lorex75 commented 10 years ago

It's the same solution I've adopted on my side. Thank you! It's unfortunate we can't return 2 different types, it's a limitation from C# which is probably nonsense with JavaScript...