diff --git a/src/objectliterals.jsdoc b/src/objectliterals.jsdoc index 60792392ac..9a7afa90bc 100644 --- a/src/objectliterals.jsdoc +++ b/src/objectliterals.jsdoc @@ -711,7 +711,7 @@ * on. * @property {Array.|undefined} resolutions Resolutions. If specified, * new canvases will be created for these resolutions only. - * @property {ol.source.State|undefined} state Source state. + * @property {ol.source.State|string|undefined} state Source state. */ /** @@ -836,7 +836,7 @@ * @property {Array.|undefined} features Features. * @property {string|undefined} logo Logo. * @property {ol.proj.ProjectionLike} projection Projection. - * @property {ol.source.State|undefined} state State. + * @property {ol.source.State|string|undefined} state State. */ /** diff --git a/src/ol/source/imagesource.js b/src/ol/source/imagesource.js index 51b8f1f0b3..4e8ea558d3 100644 --- a/src/ol/source/imagesource.js +++ b/src/ol/source/imagesource.js @@ -15,7 +15,7 @@ goog.require('ol.source.Source'); * logo: (string|undefined), * projection: ol.proj.ProjectionLike, * resolutions: (Array.|undefined), - * state: (ol.source.State|undefined)}} + * state: (ol.source.State|string|undefined)}} */ ol.source.ImageOptions; diff --git a/src/ol/source/source.js b/src/ol/source/source.js index 03f0fa027e..c9039bbbf7 100644 --- a/src/ol/source/source.js +++ b/src/ol/source/source.js @@ -23,7 +23,7 @@ ol.source.State = { * extent: (ol.Extent|undefined), * logo: (string|undefined), * projection: ol.proj.ProjectionLike, - * state: (ol.source.State|undefined)}} + * state: (ol.source.State|string|undefined)}} * @todo stability experimental */ ol.source.SourceOptions; @@ -72,7 +72,7 @@ ol.source.Source = function(options) { * @type {ol.source.State} */ this.state_ = goog.isDef(options.state) ? - options.state : ol.source.State.READY; + /** @type {ol.source.State} */ (options.state) : ol.source.State.READY; }; goog.inherits(ol.source.Source, ol.Observable);