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

Fix toStringTag return type for observable Maps and Sets #1929

Merged
merged 1 commit into from
Mar 30, 2019

Conversation

lennerd
Copy link

@lennerd lennerd commented Mar 14, 2019

This PR fixes (restores) the return type of the Symbol.toStringTag method of observable maps and sets to return either "Map" or "Set".

This fixes the following TypeScript errors:

error TS2416: Property '[Symbol.toStringTag]' in type 'ObservableMap<K, V>' is not assignable to the same property in base type 'Map<K, V>'.
  Type 'string' is not assignable to type '"Map"'.
error TS2416: Property '[Symbol.toStringTag]' in type 'ObservableSet<T>' is not assignable to the same property in base type 'Set<T>'.
  Type 'string' is not assignable to type '"Set"'.

See 4a65b50 for parts of changes causing this error.

Current workaround is to use 4.9.1 where this regression was not present.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 92.332% when pulling e556ff2 on lennerd:fix/to-string-tag into f887046 on mobxjs:mobx4-master.

@lennerd
Copy link
Author

lennerd commented Mar 28, 2019

Any news on this? This bug prevents us from using the latest version including critical bugfixes for IE 11. A browser we (sadly) need to target in our application.

@mweststrate mweststrate merged commit 01f6e92 into mobxjs:mobx4-master Mar 30, 2019
@mweststrate
Copy link
Member

Merged, releasing soon!

@mweststrate
Copy link
Member

Released as 4.9.4! Sorry for the delay!

1 similar comment
@mweststrate
Copy link
Member

Released as 4.9.4! Sorry for the delay!

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

Successfully merging this pull request may close these issues.

3 participants