-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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: make ObservableMap assignable to ES6 Map #503
Comments
Good point. I'll update it |
Hi, my editor tells me that:
|
@Valorize what is the code you get the error on, and the variable definition. Which version of typescript? (in your IDE, ide's sometimes pick a different version then you intended to compile with) |
Hi, I am unable to assign ObservableMap object to Map. I see the following error when I try to assign: I am basically trying to pass an ObservableMap object to a function that is expecting a Map<string, Foo>. I also tried doing observableMapObj.toJS() - but still hitting the same typescript error. Any pointers on how I can get this to work? I am running TS version 2.5.3 |
I've come across the same thing @arvind1234 and I've raised #1204 to ask if this should still work. |
As for now,
ObservableMap<T>
is not assignable to ES6Map<string, T>
, due to incompatibles of some methods, at least because:It sould be good to make
ObservableMap
interface be compatible to Map, for refactoring purposes.The text was updated successfully, but these errors were encountered: