diff --git a/openlayers/index.d.ts b/openlayers/index.d.ts
index 8888642fc9..9ef574de3f 100644
--- a/openlayers/index.d.ts
+++ b/openlayers/index.d.ts
@@ -4761,50 +4761,6 @@ declare module ol {
*/
function inherits(childCtor: (() => any), parentCtor: (() => any)): void;
- /**
- * @classdesc
- * Events emitted by {@link ol.interaction.DragBox} instances are instances of
- * this type.
- *
- * @param {string} type The event type.
- * @param {ol.Coordinate} coordinate The event coordinate.
- * @param {ol.MapBrowserEvent} mapBrowserEvent Originating event.
- * @extends {ol.events.Event}
- * @constructor
- * @implements {oli.DragBoxEvent}
- */
- class DragBoxEvent extends ol.events.Event {
- /**
- * @classdesc
- * Events emitted by {@link ol.interaction.DragBox} instances are instances of
- * this type.
- *
- * @param {string} type The event type.
- * @param {ol.Coordinate} coordinate The event coordinate.
- * @param {ol.MapBrowserEvent} mapBrowserEvent Originating event.
- * @extends {ol.events.Event}
- * @constructor
- * @implements {oli.DragBoxEvent}
- */
- constructor(type: string, coordinate: ol.Coordinate, mapBrowserEvent: ol.MapBrowserEvent);
-
- /**
- * The coordinate of the drag event.
- * @const
- * @type {ol.Coordinate}
- * @api stable
- */
- coordinate: ol.Coordinate;
-
- /**
- * @const
- * @type {ol.MapBrowserEvent}
- * @api
- */
- mapBrowserEvent: ol.MapBrowserEvent;
-
- }
-
/**
* @namespace ol.interaction
*/
@@ -4878,19 +4834,9 @@ declare module ol {
}
/**
- * @classdesc
- * Events emitted by {@link ol.interaction.DragAndDrop} instances are instances
- * of this type.
- *
- * @constructor
- * @extends {ol.events.Event}
- * @implements {oli.interaction.DragAndDropEvent}
- * @param {ol.interaction.DragAndDropEventType} type Type.
- * @param {File} file File.
- * @param {Array.
=} opt_features Features.
- * @param {ol.proj.Projection=} opt_projection Projection.
+ * @namespace ol.interaction.DragAndDrop
*/
- class DragAndDropEvent extends ol.events.Event {
+ module DragAndDrop {
/**
* @classdesc
* Events emitted by {@link ol.interaction.DragAndDrop} instances are instances
@@ -4904,28 +4850,44 @@ declare module ol {
* @param {Array.=} opt_features Features.
* @param {ol.proj.Projection=} opt_projection Projection.
*/
- constructor(type: ol.interaction.DragAndDropEventType, file: File, opt_features?: ol.Feature[], opt_projection?: ol.proj.Projection);
-
- /**
- * The features parsed from dropped data.
- * @type {Array.|undefined}
- * @api stable
- */
- features: ol.Feature[];
-
- /**
- * The dropped file.
- * @type {File}
- * @api stable
- */
- file: File;
-
- /**
- * The feature projection.
- * @type {ol.proj.Projection|undefined}
- * @api
- */
- projection: ol.proj.Projection;
+ class Event extends ol.events.Event {
+ /**
+ * @classdesc
+ * Events emitted by {@link ol.interaction.DragAndDrop} instances are instances
+ * of this type.
+ *
+ * @constructor
+ * @extends {ol.events.Event}
+ * @implements {oli.interaction.DragAndDropEvent}
+ * @param {ol.interaction.DragAndDropEventType} type Type.
+ * @param {File} file File.
+ * @param {Array.=} opt_features Features.
+ * @param {ol.proj.Projection=} opt_projection Projection.
+ */
+ constructor(type: ol.interaction.DragAndDropEventType, file: File, opt_features?: ol.Feature[], opt_projection?: ol.proj.Projection);
+
+ /**
+ * The features parsed from dropped data.
+ * @type {Array.|undefined}
+ * @api stable
+ */
+ features: ol.Feature[];
+
+ /**
+ * The dropped file.
+ * @type {File}
+ * @api stable
+ */
+ file: File;
+
+ /**
+ * The feature projection.
+ * @type {ol.proj.Projection|undefined}
+ * @api
+ */
+ projection: ol.proj.Projection;
+
+ }
}
@@ -4977,6 +4939,58 @@ declare module ol {
}
+ /**
+ * @namespace ol.interaction.DragBox
+ */
+ module DragBox {
+ /**
+ * @classdesc
+ * Events emitted by {@link ol.interaction.DragBox} instances are instances of
+ * this type.
+ *
+ * @param {string} type The event type.
+ * @param {ol.Coordinate} coordinate The event coordinate.
+ * @param {ol.MapBrowserEvent} mapBrowserEvent Originating event.
+ * @extends {ol.events.Event}
+ * @constructor
+ * @implements {oli.DragBoxEvent}
+ */
+ class Event extends ol.events.Event {
+ /**
+ * @classdesc
+ * Events emitted by {@link ol.interaction.DragBox} instances are instances of
+ * this type.
+ *
+ * @param {string} type The event type.
+ * @param {ol.Coordinate} coordinate The event coordinate.
+ * @param {ol.MapBrowserEvent} mapBrowserEvent Originating event.
+ * @extends {ol.events.Event}
+ * @constructor
+ * @implements {oli.DragBoxEvent}
+ */
+ constructor(type: string, coordinate: ol.Coordinate, mapBrowserEvent: ol.MapBrowserEvent);
+
+ /**
+ * The coordinate of the drag event.
+ * @const
+ * @type {ol.Coordinate}
+ * @api stable
+ */
+ coordinate: ol.Coordinate;
+
+ /**
+ * @const
+ * @type {ol.MapBrowserEvent}
+ * @api
+ */
+ mapBrowserEvent: ol.MapBrowserEvent;
+
+ }
+
+ }
+
+ type DragBoxEventType = string;
+
/**
* @classdesc
* Allows the user to pan the map by dragging the map.
@@ -5100,17 +5114,9 @@ declare module ol {
}
/**
- * @classdesc
- * Events emitted by {@link ol.interaction.Draw} instances are instances of
- * this type.
- *
- * @constructor
- * @extends {ol.events.Event}
- * @implements {oli.DrawEvent}
- * @param {ol.interaction.DrawEventType} type Type.
- * @param {ol.Feature} feature The feature drawn.
+ * @namespace ol.interaction.Draw
*/
- class DrawEvent extends ol.events.Event {
+ module Draw {
/**
* @classdesc
* Events emitted by {@link ol.interaction.Draw} instances are instances of
@@ -5122,14 +5128,28 @@ declare module ol {
* @param {ol.interaction.DrawEventType} type Type.
* @param {ol.Feature} feature The feature drawn.
*/
- constructor(type: ol.interaction.DrawEventType, feature: ol.Feature);
-
- /**
- * The feature being drawn.
- * @type {ol.Feature}
- * @api stable
- */
- feature: ol.Feature;
+ class Event extends ol.events.Event {
+ /**
+ * @classdesc
+ * Events emitted by {@link ol.interaction.Draw} instances are instances of
+ * this type.
+ *
+ * @constructor
+ * @extends {ol.events.Event}
+ * @implements {oli.DrawEvent}
+ * @param {ol.interaction.DrawEventType} type Type.
+ * @param {ol.Feature} feature The feature drawn.
+ */
+ constructor(type: ol.interaction.DrawEventType, feature: ol.Feature);
+
+ /**
+ * The feature being drawn.
+ * @type {ol.Feature}
+ * @api stable
+ */
+ feature: ol.Feature;
+
+ }
}
@@ -5386,19 +5406,9 @@ declare module ol {
}
/**
- * @classdesc
- * Events emitted by {@link ol.interaction.Modify} instances are instances of
- * this type.
- *
- * @constructor
- * @extends {ol.events.Event}
- * @implements {oli.ModifyEvent}
- * @param {ol.ModifyEventType} type Type.
- * @param {ol.Collection.} features The features modified.
- * @param {ol.MapBrowserPointerEvent} mapBrowserPointerEvent Associated
- * {@link ol.MapBrowserPointerEvent}.
+ * @namespace ol.interaction.Modify
*/
- class ModifyEvent extends ol.events.Event {
+ module Modify {
/**
* @classdesc
* Events emitted by {@link ol.interaction.Modify} instances are instances of
@@ -5412,21 +5422,37 @@ declare module ol {
* @param {ol.MapBrowserPointerEvent} mapBrowserPointerEvent Associated
* {@link ol.MapBrowserPointerEvent}.
*/
- constructor(type: ol.ModifyEventType, features: ol.Collection, mapBrowserPointerEvent: ol.MapBrowserPointerEvent);
-
- /**
- * The features being modified.
- * @type {ol.Collection.}
- * @api
- */
- features: ol.Collection;
-
- /**
- * Associated {@link ol.MapBrowserEvent}.
- * @type {ol.MapBrowserEvent}
- * @api
- */
- mapBrowserEvent: ol.MapBrowserEvent;
+ class Event extends ol.events.Event {
+ /**
+ * @classdesc
+ * Events emitted by {@link ol.interaction.Modify} instances are instances of
+ * this type.
+ *
+ * @constructor
+ * @extends {ol.events.Event}
+ * @implements {oli.ModifyEvent}
+ * @param {ol.ModifyEventType} type Type.
+ * @param {ol.Collection.} features The features modified.
+ * @param {ol.MapBrowserPointerEvent} mapBrowserPointerEvent Associated
+ * {@link ol.MapBrowserPointerEvent}.
+ */
+ constructor(type: ol.ModifyEventType, features: ol.Collection, mapBrowserPointerEvent: ol.MapBrowserPointerEvent);
+
+ /**
+ * The features being modified.
+ * @type {ol.Collection.}
+ * @api
+ */
+ features: ol.Collection;
+
+ /**
+ * Associated {@link ol.MapBrowserEvent}.
+ * @type {ol.MapBrowserEvent}
+ * @api
+ */
+ mapBrowserEvent: ol.MapBrowserEvent;
+
+ }
}
@@ -5804,18 +5830,9 @@ declare module ol {
}
/**
- * @classdesc
- * Events emitted by {@link ol.interaction.Translate} instances are instances of
- * this type.
- *
- * @constructor
- * @extends {ol.events.Event}
- * @implements {oli.interaction.TranslateEvent}
- * @param {ol.interaction.TranslateEventType} type Type.
- * @param {ol.Collection.} features The features translated.
- * @param {ol.Coordinate} coordinate The event coordinate.
+ * @namespace ol.interaction.Translate
*/
- class TranslateEvent extends ol.events.Event {
+ module Translate {
/**
* @classdesc
* Events emitted by {@link ol.interaction.Translate} instances are instances of
@@ -5828,22 +5845,37 @@ declare module ol {
* @param {ol.Collection.} features The features translated.
* @param {ol.Coordinate} coordinate The event coordinate.
*/
- constructor(type: ol.interaction.TranslateEventType, features: ol.Collection, coordinate: ol.Coordinate);
-
- /**
- * The features being translated.
- * @type {ol.Collection.}
- * @api
- */
- features: ol.Collection;
-
- /**
- * The coordinate of the drag event.
- * @const
- * @type {ol.Coordinate}
- * @api
- */
- coordinate: ol.Coordinate;
+ class Event extends ol.events.Event {
+ /**
+ * @classdesc
+ * Events emitted by {@link ol.interaction.Translate} instances are instances of
+ * this type.
+ *
+ * @constructor
+ * @extends {ol.events.Event}
+ * @implements {oli.interaction.TranslateEvent}
+ * @param {ol.interaction.TranslateEventType} type Type.
+ * @param {ol.Collection.} features The features translated.
+ * @param {ol.Coordinate} coordinate The event coordinate.
+ */
+ constructor(type: ol.interaction.TranslateEventType, features: ol.Collection, coordinate: ol.Coordinate);
+
+ /**
+ * The features being translated.
+ * @type {ol.Collection.}
+ * @api
+ */
+ features: ol.Collection;
+
+ /**
+ * The coordinate of the drag event.
+ * @const
+ * @type {ol.Coordinate}
+ * @api
+ */
+ coordinate: ol.Coordinate;
+
+ }
}