We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug The setMap method of the Control class does not allow passing in undefined in TypeScript.
setMap
Control
undefined
If you look at the underlying code in this method, it is clear that this.map_ being set/get can be undefined
this.map_
To Reproduce Steps to reproduce the behavior:
Expected behavior
It should be allowed, instead the TypeScript compiler will error: Argument of type 'undefined' is not assignable to parameter of type 'PluggableMap'
Argument of type 'undefined' is not assignable to parameter of type 'PluggableMap'
The text was updated successfully, but these errors were encountered:
openlayers#12758: Allow undefined to be passed to control setMap(). C…
67d885d
…onsequently the return type of getMap() now can also be undefined as well.
Merge pull request #12759 from jumpinjackie/fix/control-typings
0d06f7b
#12758: Allow undefined to be passed to control setMap(). Also fix type of getMap()
Successfully merging a pull request may close this issue.
Describe the bug
The
setMap
method of theControl
class does not allow passing inundefined
in TypeScript.If you look at the underlying code in this method, it is clear that
this.map_
being set/get can beundefined
To Reproduce
Steps to reproduce the behavior:
undefined
tosetMap
of anyControl
instance.Expected behavior
It should be allowed, instead the TypeScript compiler will error:
Argument of type 'undefined' is not assignable to parameter of type 'PluggableMap'
The text was updated successfully, but these errors were encountered: