Improve some null types to prepare for strictNullChecks
This commit is contained in:
@@ -168,7 +168,7 @@ class DragAndDrop extends Interaction {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {HTMLElement}
|
||||
* @type {HTMLElement|null}
|
||||
*/
|
||||
this.target = options.target ? options.target : null;
|
||||
}
|
||||
|
||||
@@ -257,14 +257,14 @@ class Draw extends PointerInteraction {
|
||||
|
||||
/**
|
||||
* Target source for drawn features.
|
||||
* @type {VectorSource}
|
||||
* @type {VectorSource|null}
|
||||
* @private
|
||||
*/
|
||||
this.source_ = options.source ? options.source : null;
|
||||
|
||||
/**
|
||||
* Target collection for drawn features.
|
||||
* @type {import("../Collection.js").default<Feature>}
|
||||
* @type {import("../Collection.js").default<Feature>|null}
|
||||
* @private
|
||||
*/
|
||||
this.features_ = options.features ? options.features : null;
|
||||
@@ -1022,7 +1022,7 @@ class Draw extends PointerInteraction {
|
||||
|
||||
/**
|
||||
* Stop drawing without adding the sketch feature to the target layer.
|
||||
* @return {Feature<import("../geom/SimpleGeometry.js").default>} The sketch feature (or null if none).
|
||||
* @return {Feature<import("../geom/SimpleGeometry.js").default>|null} The sketch feature (or null if none).
|
||||
* @private
|
||||
*/
|
||||
abortDrawing_() {
|
||||
|
||||
@@ -115,7 +115,7 @@ class Snap extends PointerInteraction {
|
||||
super(pointerOptions);
|
||||
|
||||
/**
|
||||
* @type {import("../source/Vector.js").default}
|
||||
* @type {import("../source/Vector.js").default|null}
|
||||
* @private
|
||||
*/
|
||||
this.source_ = options.source ? options.source : null;
|
||||
@@ -133,7 +133,7 @@ class Snap extends PointerInteraction {
|
||||
this.edge_ = options.edge !== undefined ? options.edge : true;
|
||||
|
||||
/**
|
||||
* @type {import("../Collection.js").default<import("../Feature.js").default>}
|
||||
* @type {import("../Collection.js").default<import("../Feature.js").default>|null}
|
||||
* @private
|
||||
*/
|
||||
this.features_ = options.features ? options.features : null;
|
||||
|
||||
@@ -169,7 +169,7 @@ class Translate extends PointerInteraction {
|
||||
this.startCoordinate_ = null;
|
||||
|
||||
/**
|
||||
* @type {Collection<import("../Feature.js").default>}
|
||||
* @type {Collection<import("../Feature.js").default>|null}
|
||||
* @private
|
||||
*/
|
||||
this.features_ = options.features !== undefined ? options.features : null;
|
||||
|
||||
Reference in New Issue
Block a user