From f29e6ac397a221d18f75baa5b9488fcfcc687fee Mon Sep 17 00:00:00 2001 From: ahocevar Date: Thu, 13 Sep 2018 11:41:39 +0200 Subject: [PATCH] Fix more incorrect type imports --- src/ol/Object.js | 4 ++-- src/ol/layer/Layer.js | 2 +- src/ol/source/Source.js | 10 +++++----- src/ol/source/State.js | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/ol/Object.js b/src/ol/Object.js index 719cf545f1..8b243b3a4c 100644 --- a/src/ol/Object.js +++ b/src/ol/Object.js @@ -11,8 +11,8 @@ import {assign} from './obj.js'; /** * @classdesc * Events emitted by {@link module:ol/Object~BaseObject} instances are instances of this type. - */ -class ObjectEvent extends Event { + */ +export class ObjectEvent extends Event { /** * @param {string} type The event type. diff --git a/src/ol/layer/Layer.js b/src/ol/layer/Layer.js index 4da01a56bb..4916a09c00 100644 --- a/src/ol/layer/Layer.js +++ b/src/ol/layer/Layer.js @@ -37,7 +37,7 @@ import SourceState from '../source/State.js'; * @typedef {Object} State * @property {import("./Layer.js").default} layer * @property {number} opacity - * @property {import("../source/Source.js").State} sourceState + * @property {SourceState} sourceState * @property {boolean} visible * @property {boolean} managed * @property {import("../extent.js").Extent} [extent] diff --git a/src/ol/source/Source.js b/src/ol/source/Source.js index 0d6377f0c3..5fdffd2fbf 100644 --- a/src/ol/source/Source.js +++ b/src/ol/source/Source.js @@ -5,7 +5,7 @@ import {VOID} from '../functions.js'; import BaseObject from '../Object.js'; import {get as getProjection} from '../proj.js'; -import SourceState from '../source/State.js'; +import SourceState from './State.js'; /** @@ -32,7 +32,7 @@ import SourceState from '../source/State.js'; * @typedef {Object} Options * @property {AttributionLike} [attributions] * @property {import("../proj.js").ProjectionLike} projection - * @property {import("./State.js").default} [state] + * @property {SourceState} [state] * @property {boolean} [wrapX] */ @@ -75,7 +75,7 @@ class Source extends BaseObject { /** * @private - * @type {import("./State.js").default} + * @type {SourceState} */ this.state_ = options.state !== undefined ? options.state : SourceState.READY; @@ -137,7 +137,7 @@ class Source extends BaseObject { /** * Get the state of the source, see {@link module:ol/source/State~State} for possible states. - * @return {import("./State.js").default} State. + * @return {SourceState} State. * @api */ getState() { @@ -173,7 +173,7 @@ class Source extends BaseObject { /** * Set the state of the source. - * @param {import("./State.js").default} state State. + * @param {SourceState} state State. * @protected */ setState(state) { diff --git a/src/ol/source/State.js b/src/ol/source/State.js index 8f2947e914..6e5dc8ac79 100644 --- a/src/ol/source/State.js +++ b/src/ol/source/State.js @@ -3,8 +3,8 @@ */ /** - * State of the source, one of 'undefined', 'loading', 'ready' or 'error'. * @enum {string} + * State of the source, one of 'undefined', 'loading', 'ready' or 'error'. */ export default { UNDEFINED: 'undefined',