Transformed types

Using the [ts.js codemod](https://gist.github.com/tschaub/1ea498c9d1e5268cf36d212b3949be4e):

    jscodeshift --transform ts.js src
This commit is contained in:
Tim Schaub
2018-09-05 08:05:29 -06:00
parent f2aaaa19e1
commit ccfacc5ee6
239 changed files with 3999 additions and 3999 deletions

View File

@@ -9,53 +9,53 @@ import {getValues} from '../obj.js';
/**
* @param {module:ol/MapBrowserPointerEvent} mapBrowserEvent Event.
* @this {module:ol/interaction/Pointer}
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
* @this {import("./Pointer.js").default}
*/
const handleDragEvent = VOID;
/**
* @param {module:ol/MapBrowserPointerEvent} mapBrowserEvent Event.
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
* @return {boolean} Capture dragging.
* @this {module:ol/interaction/Pointer}
* @this {import("./Pointer.js").default}
*/
const handleUpEvent = FALSE;
/**
* @param {module:ol/MapBrowserPointerEvent} mapBrowserEvent Event.
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
* @return {boolean} Capture dragging.
* @this {module:ol/interaction/Pointer}
* @this {import("./Pointer.js").default}
*/
const handleDownEvent = FALSE;
/**
* @param {module:ol/MapBrowserPointerEvent} mapBrowserEvent Event.
* @this {module:ol/interaction/Pointer}
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
* @this {import("./Pointer.js").default}
*/
const handleMoveEvent = VOID;
/**
* @typedef {Object} Options
* @property {function(module:ol/MapBrowserPointerEvent):boolean} [handleDownEvent]
* @property {function(import("../MapBrowserPointerEvent.js").default):boolean} [handleDownEvent]
* Function handling "down" events. If the function returns `true` then a drag
* sequence is started.
* @property {function(module:ol/MapBrowserPointerEvent)} [handleDragEvent]
* @property {function(import("../MapBrowserPointerEvent.js").default)} [handleDragEvent]
* Function handling "drag" events. This function is called on "move" events
* during a drag sequence.
* @property {function(module:ol/MapBrowserEvent):boolean} [handleEvent]
* @property {function(import("../MapBrowserEvent.js").default):boolean} [handleEvent]
* Method called by the map to notify the interaction that a browser event was
* dispatched to the map. The function may return `false` to prevent the
* propagation of the event to other interactions in the map's interactions
* chain.
* @property {function(module:ol/MapBrowserPointerEvent)} [handleMoveEvent]
* @property {function(import("../MapBrowserPointerEvent.js").default)} [handleMoveEvent]
* Function handling "move" events. This function is called on "move" events,
* also during a drag sequence (so during a drag sequence both the
* `handleDragEvent` function and this function are called).
* @property {function(module:ol/MapBrowserPointerEvent):boolean} [handleUpEvent]
* @property {function(import("../MapBrowserPointerEvent.js").default):boolean} [handleUpEvent]
* Function handling "up" events. If the function returns `false` then the
* current drag sequence is stopped.
* @property {function(boolean):boolean} stopDown
@@ -77,7 +77,7 @@ const handleMoveEvent = VOID;
*/
class PointerInteraction extends Interaction {
/**
* @param {module:ol/interaction/Pointer~Options=} opt_options Options.
* @param {Options=} opt_options Options.
*/
constructor(opt_options) {
@@ -88,28 +88,28 @@ class PointerInteraction extends Interaction {
});
/**
* @type {function(module:ol/MapBrowserPointerEvent):boolean}
* @type {function(import("../MapBrowserPointerEvent.js").default):boolean}
* @private
*/
this.handleDownEvent_ = options.handleDownEvent ?
options.handleDownEvent : handleDownEvent;
/**
* @type {function(module:ol/MapBrowserPointerEvent)}
* @type {function(import("../MapBrowserPointerEvent.js").default)}
* @private
*/
this.handleDragEvent_ = options.handleDragEvent ?
options.handleDragEvent : handleDragEvent;
/**
* @type {function(module:ol/MapBrowserPointerEvent)}
* @type {function(import("../MapBrowserPointerEvent.js").default)}
* @private
*/
this.handleMoveEvent_ = options.handleMoveEvent ?
options.handleMoveEvent : handleMoveEvent;
/**
* @type {function(module:ol/MapBrowserPointerEvent):boolean}
* @type {function(import("../MapBrowserPointerEvent.js").default):boolean}
* @private
*/
this.handleUpEvent_ = options.handleUpEvent ?
@@ -130,13 +130,13 @@ class PointerInteraction extends Interaction {
this.stopDown = options.stopDown ? options.stopDown : stopDown;
/**
* @type {!Object<string, module:ol/pointer/PointerEvent>}
* @type {!Object<string, import("../pointer/PointerEvent.js").default>}
* @private
*/
this.trackedPointers_ = {};
/**
* @type {Array<module:ol/pointer/PointerEvent>}
* @type {Array<import("../pointer/PointerEvent.js").default>}
* @protected
*/
this.targetPointers = [];
@@ -144,7 +144,7 @@ class PointerInteraction extends Interaction {
}
/**
* @param {module:ol/MapBrowserPointerEvent} mapBrowserEvent Event.
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
* @private
*/
updateTrackedPointers_(mapBrowserEvent) {
@@ -169,8 +169,8 @@ class PointerInteraction extends Interaction {
/**
* @param {Array<module:ol/pointer/PointerEvent>} pointerEvents List of events.
* @return {module:ol/pixel~Pixel} Centroid pixel.
* @param {Array<import("../pointer/PointerEvent.js").default>} pointerEvents List of events.
* @return {import("../pixel.js").Pixel} Centroid pixel.
*/
export function centroid(pointerEvents) {
const length = pointerEvents.length;
@@ -185,7 +185,7 @@ export function centroid(pointerEvents) {
/**
* @param {module:ol/MapBrowserPointerEvent} mapBrowserEvent Event.
* @param {import("../MapBrowserPointerEvent.js").default} mapBrowserEvent Event.
* @return {boolean} Whether the event is a pointerdown, pointerdrag
* or pointerup event.
*/
@@ -201,9 +201,9 @@ function isPointerDraggingEvent(mapBrowserEvent) {
* Handles the {@link module:ol/MapBrowserEvent map browser event} and may call into
* other functions, if event sequences like e.g. 'drag' or 'down-up' etc. are
* detected.
* @param {module:ol/MapBrowserEvent} mapBrowserEvent Map browser event.
* @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Map browser event.
* @return {boolean} `false` to stop event propagation.
* @this {module:ol/interaction/Pointer}
* @this {import("./Pointer.js").default}
* @api
*/
export function handleEvent(mapBrowserEvent) {