Merge pull request #8781 from schmidtk/ts-misc-errors
Fix type check errors
This commit is contained in:
@@ -155,7 +155,7 @@ class OverviewMap extends Control {
|
|||||||
const ovmap = this.ovmap_;
|
const ovmap = this.ovmap_;
|
||||||
|
|
||||||
if (options.layers) {
|
if (options.layers) {
|
||||||
options.layers.forEach(
|
/** @type {Array<import("../layer/Layer.js").default>} */ (options.layers).forEach(
|
||||||
/**
|
/**
|
||||||
* @param {import("../layer/Layer.js").default} layer Layer.
|
* @param {import("../layer/Layer.js").default} layer Layer.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ class RenderFeature {
|
|||||||
if (!this.flatInteriorPoints_) {
|
if (!this.flatInteriorPoints_) {
|
||||||
const flatCenter = getCenter(this.getExtent());
|
const flatCenter = getCenter(this.getExtent());
|
||||||
this.flatInteriorPoints_ = getInteriorPointOfArray(
|
this.flatInteriorPoints_ = getInteriorPointOfArray(
|
||||||
this.flatCoordinates_, 0, this.ends_, 2, flatCenter, 0);
|
this.flatCoordinates_, 0, /** @type {Array<number>} */ (this.ends_), 2, flatCenter, 0);
|
||||||
}
|
}
|
||||||
return this.flatInteriorPoints_;
|
return this.flatInteriorPoints_;
|
||||||
}
|
}
|
||||||
@@ -126,9 +126,9 @@ class RenderFeature {
|
|||||||
getFlatInteriorPoints() {
|
getFlatInteriorPoints() {
|
||||||
if (!this.flatInteriorPoints_) {
|
if (!this.flatInteriorPoints_) {
|
||||||
const flatCenters = linearRingssCenter(
|
const flatCenters = linearRingssCenter(
|
||||||
this.flatCoordinates_, 0, this.ends_, 2);
|
this.flatCoordinates_, 0, /** @type {Array<Array<number>>} */ (this.ends_), 2);
|
||||||
this.flatInteriorPoints_ = getInteriorPointsOfMultiArray(
|
this.flatInteriorPoints_ = getInteriorPointsOfMultiArray(
|
||||||
this.flatCoordinates_, 0, this.ends_, 2, flatCenters);
|
this.flatCoordinates_, 0, /** @type {Array<Array<number>>} */ (this.ends_), 2, flatCenters);
|
||||||
}
|
}
|
||||||
return this.flatInteriorPoints_;
|
return this.flatInteriorPoints_;
|
||||||
}
|
}
|
||||||
@@ -152,7 +152,7 @@ class RenderFeature {
|
|||||||
this.flatMidpoints_ = [];
|
this.flatMidpoints_ = [];
|
||||||
const flatCoordinates = this.flatCoordinates_;
|
const flatCoordinates = this.flatCoordinates_;
|
||||||
let offset = 0;
|
let offset = 0;
|
||||||
const ends = this.ends_;
|
const ends = /** @type {Array<number>} */ (this.ends_);
|
||||||
for (let i = 0, ii = ends.length; i < ii; ++i) {
|
for (let i = 0, ii = ends.length; i < ii; ++i) {
|
||||||
const end = ends[i];
|
const end = ends[i];
|
||||||
const midpoint = interpolatePoint(
|
const midpoint = interpolatePoint(
|
||||||
|
|||||||
@@ -43,6 +43,9 @@ class LayerRenderer extends Observable {
|
|||||||
* @return {boolean} The tile range is fully loaded.
|
* @return {boolean} The tile range is fully loaded.
|
||||||
*/
|
*/
|
||||||
function(zoom, tileRange) {
|
function(zoom, tileRange) {
|
||||||
|
/**
|
||||||
|
* @param {import("../Tile.js").default} tile Tile.
|
||||||
|
*/
|
||||||
function callback(tile) {
|
function callback(tile) {
|
||||||
if (!tiles[zoom]) {
|
if (!tiles[zoom]) {
|
||||||
tiles[zoom] = {};
|
tiles[zoom] = {};
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ class TileSource extends Source {
|
|||||||
* @param {import("../proj/Projection.js").default} projection Projection.
|
* @param {import("../proj/Projection.js").default} projection Projection.
|
||||||
* @param {number} z Zoom level.
|
* @param {number} z Zoom level.
|
||||||
* @param {import("../TileRange.js").default} tileRange Tile range.
|
* @param {import("../TileRange.js").default} tileRange Tile range.
|
||||||
* @param {function(import("../Tile.js").default):(boolean|undefined)} callback Called with each
|
* @param {function(import("../Tile.js").default):(boolean|void)} callback Called with each
|
||||||
* loaded tile. If the callback returns `false`, the tile will not be
|
* loaded tile. If the callback returns `false`, the tile will not be
|
||||||
* considered loaded.
|
* considered loaded.
|
||||||
* @return {boolean} The tile range is fully covered with loaded tiles.
|
* @return {boolean} The tile range is fully covered with loaded tiles.
|
||||||
|
|||||||
Reference in New Issue
Block a user