Closed jumpinjackie closed 8 years ago
If a union type includes undefined, the type as a whole should be implied as being optional.
undefined
Take the layers property of the OverviewMap options:
layers
https://github.com/openlayers/ol3/blob/v3.18.2/externs/olx.js#L1170
This is currently being emitted as:
layers: ol.layer.Layer[]|ol.Collection<ol.layer.Layer>
when it should've been emitted as
layers?: ol.layer.Layer[]|ol.Collection<ol.layer.Layer>
It's only happening on that particular case, other cases are properly turned into optional properties.
EDIT: It's a false positive. An override declaration was being written out,.
If a union type includes
undefined
, the type as a whole should be implied as being optional.Take the
layers
property of the OverviewMap options:https://github.com/openlayers/ol3/blob/v3.18.2/externs/olx.js#L1170
This is currently being emitted as:
layers: ol.layer.Layer[]|ol.Collection<ol.layer.Layer>
when it should've been emitted as
layers?: ol.layer.Layer[]|ol.Collection<ol.layer.Layer>