Merge pull request #8825 from schmidtk/ts-misc-errors
Fix TypeScript errors
This commit is contained in:
@@ -204,7 +204,8 @@ class OverviewMap extends Control {
|
||||
};
|
||||
|
||||
const move = function(event) {
|
||||
const coordinates = ovmap.getEventCoordinate(computeDesiredMousePosition(event));
|
||||
const position = /** @type {?} */ (computeDesiredMousePosition(event));
|
||||
const coordinates = ovmap.getEventCoordinate(/** @type {Event} */ (position));
|
||||
|
||||
overlay.setPosition(coordinates);
|
||||
};
|
||||
|
||||
@@ -15,8 +15,7 @@ class And extends LogicalNary {
|
||||
* @param {...import("./Filter.js").default} conditions Conditions.
|
||||
*/
|
||||
constructor(conditions) {
|
||||
const params = ['And'].concat(Array.prototype.slice.call(arguments));
|
||||
super(...params);
|
||||
super('And', Array.prototype.slice.call(arguments));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ class LogicalNary extends Filter {
|
||||
|
||||
/**
|
||||
* @param {!string} tagName The XML tag name for this filter.
|
||||
* @param {...import("./Filter.js").default} conditions Conditions.
|
||||
* @param {Array<import("./Filter.js").default>} conditions Conditions.
|
||||
*/
|
||||
constructor(tagName, conditions) {
|
||||
|
||||
@@ -24,7 +24,7 @@ class LogicalNary extends Filter {
|
||||
/**
|
||||
* @type {Array<import("./Filter.js").default>}
|
||||
*/
|
||||
this.conditions = Array.prototype.slice.call(arguments, 1);
|
||||
this.conditions = conditions;
|
||||
assert(this.conditions.length >= 2, 57); // At least 2 conditions are required.
|
||||
}
|
||||
|
||||
|
||||
@@ -14,8 +14,7 @@ class Or extends LogicalNary {
|
||||
* @param {...import("./Filter.js").default} conditions Conditions.
|
||||
*/
|
||||
constructor(conditions) {
|
||||
const params = ['Or'].concat(Array.prototype.slice.call(arguments));
|
||||
super(...params);
|
||||
super('Or', Array.prototype.slice.call(arguments));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ class IntermediateCanvasRenderer extends CanvasLayerRenderer {
|
||||
if (this.getLayer().getSource().forEachFeatureAtCoordinate !== VOID) {
|
||||
// for ImageCanvas sources use the original hit-detection logic,
|
||||
// so that for example also transparent polygons are detected
|
||||
return super.forEachLayerAtCoordinate(arguments);
|
||||
return super.forEachLayerAtCoordinate(coordinate, frameState, hitTolerance, callback, thisArg);
|
||||
} else {
|
||||
const pixel = applyTransform(this.coordinateToCanvasPixelTransform, coordinate.slice());
|
||||
scaleCoordinate(pixel, frameState.viewState.resolution / this.renderedResolution);
|
||||
|
||||
@@ -142,7 +142,7 @@ function renderFeatureInternal(replayGroup, feature, style, squaredTolerance) {
|
||||
|
||||
/**
|
||||
* @param {import("../render/ReplayGroup.js").default} replayGroup Replay group.
|
||||
* @param {import("../geom/Geometry.js").default} geometry Geometry.
|
||||
* @param {import("../geom/Geometry.js").default|import("../render/Feature.js").default} geometry Geometry.
|
||||
* @param {import("../style/Style.js").default} style Style.
|
||||
* @param {import("../Feature.js").FeatureLike} feature Feature.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user