Fix type checks in VectorTileSource
Use typeof(Class) instead of defining a typedef for the tile class
This commit is contained in:
@@ -36,8 +36,7 @@ class VectorImageTile extends Tile {
|
||||
* @param {Object<string, import("./VectorTile.js").default>} sourceTiles Source tiles.
|
||||
* @param {number} pixelRatio Pixel ratio.
|
||||
* @param {import("./proj/Projection.js").default} projection Projection.
|
||||
* @param {function(new: import("./VectorTile.js").default, import("./tilecoord.js").TileCoord, TileState, string,
|
||||
* import("./format/Feature.js").default, import("./Tile.js").LoadFunction)} tileClass Class to
|
||||
* @param {typeof import("./VectorTile.js").default} tileClass Class to
|
||||
* instantiate for source tiles.
|
||||
* @param {function(this: import("./source/VectorTile.js").default, import("./events/Event.js").default)} handleTileChange
|
||||
* Function to call when a source tile's state changes.
|
||||
|
||||
@@ -12,12 +12,6 @@ import TileState from './TileState.js';
|
||||
const DEFAULT_EXTENT = [0, 0, 4096, 4096];
|
||||
|
||||
|
||||
/**
|
||||
* @typedef {function(new: VectorTile, import("./tilecoord.js").TileCoord,
|
||||
* TileState, string, ?string, import("./Tile.js").LoadFunction)} TileClass
|
||||
* @api
|
||||
*/
|
||||
|
||||
class VectorTile extends Tile {
|
||||
|
||||
/**
|
||||
|
||||
@@ -22,7 +22,7 @@ import {createXYZ, extentFromProjection, createForProjection} from '../tilegrid.
|
||||
* stroke operations.
|
||||
* @property {import("../proj.js").ProjectionLike} projection Projection.
|
||||
* @property {import("./State.js").default} [state] Source state.
|
||||
* @property {import("../VectorTile.js").TileClass} [tileClass] Class used to instantiate image tiles.
|
||||
* @property {typeof import("../VectorTile.js").default} [tileClass] Class used to instantiate image tiles.
|
||||
* Default is {@link module:ol/VectorTile}.
|
||||
* @property {number} [maxZoom=22] Optional max zoom level.
|
||||
* @property {number} [minZoom] Optional min zoom level.
|
||||
@@ -123,10 +123,9 @@ class VectorTile extends UrlTile {
|
||||
this.overlaps_ = options.overlaps == undefined ? true : options.overlaps;
|
||||
|
||||
/**
|
||||
* @protected
|
||||
* @type {function(new: Tile, import("../tilecoord.js").TileCoord, TileState, string,
|
||||
* import("../format/Feature.js").default, import("../Tile.js").LoadFunction)}
|
||||
*/
|
||||
* @protected
|
||||
* @type {typeof import("../VectorTile.js").default}
|
||||
*/
|
||||
this.tileClass = options.tileClass ? options.tileClass : Tile;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user