Add olx.layer.ImageOptions typedef
Set ol.layer.Image#getSource return type to ol.source.Image
Remove unnecessary type cast
Set ol.layer.Tile#getSource return type to ol.source.Tile
Remove unnecessary type cast
Merge pull request #2656 from fredj/image-layer-source-type

Set ol.layer.Image#getSource return type to ol.source.Image
Remove undefined from ol.Map#getLayers return type

It's already assumed that the collection is defined in ol.Map#addLayer
and ol.Map#removeLayer.
Disallow undefined layers collection