Merge pull request #8744 from wallw-bits/fix-typecheck-vectortilesource
Fix type checks in VectorTileSource
This commit is contained in:
@@ -36,8 +36,7 @@ class VectorImageTile extends Tile {
|
|||||||
* @param {Object<string, import("./VectorTile.js").default>} sourceTiles Source tiles.
|
* @param {Object<string, import("./VectorTile.js").default>} sourceTiles Source tiles.
|
||||||
* @param {number} pixelRatio Pixel ratio.
|
* @param {number} pixelRatio Pixel ratio.
|
||||||
* @param {import("./proj/Projection.js").default} projection Projection.
|
* @param {import("./proj/Projection.js").default} projection Projection.
|
||||||
* @param {function(new: import("./VectorTile.js").default, import("./tilecoord.js").TileCoord, TileState, string,
|
* @param {typeof import("./VectorTile.js").default} tileClass Class to
|
||||||
* import("./format/Feature.js").default, import("./Tile.js").LoadFunction)} tileClass Class to
|
|
||||||
* instantiate for source tiles.
|
* instantiate for source tiles.
|
||||||
* @param {function(this: import("./source/VectorTile.js").default, import("./events/Event.js").default)} handleTileChange
|
* @param {function(this: import("./source/VectorTile.js").default, import("./events/Event.js").default)} handleTileChange
|
||||||
* Function to call when a source tile's state changes.
|
* 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];
|
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 {
|
class VectorTile extends Tile {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import {createXYZ, extentFromProjection, createForProjection} from '../tilegrid.
|
|||||||
* stroke operations.
|
* stroke operations.
|
||||||
* @property {import("../proj.js").ProjectionLike} projection Projection.
|
* @property {import("../proj.js").ProjectionLike} projection Projection.
|
||||||
* @property {import("./State.js").default} [state] Source state.
|
* @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}.
|
* Default is {@link module:ol/VectorTile}.
|
||||||
* @property {number} [maxZoom=22] Optional max zoom level.
|
* @property {number} [maxZoom=22] Optional max zoom level.
|
||||||
* @property {number} [minZoom] Optional min 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;
|
this.overlaps_ = options.overlaps == undefined ? true : options.overlaps;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @protected
|
* @protected
|
||||||
* @type {function(new: Tile, import("../tilecoord.js").TileCoord, TileState, string,
|
* @type {typeof import("../VectorTile.js").default}
|
||||||
* import("../format/Feature.js").default, import("../Tile.js").LoadFunction)}
|
*/
|
||||||
*/
|
|
||||||
this.tileClass = options.tileClass ? options.tileClass : Tile;
|
this.tileClass = options.tileClass ? options.tileClass : Tile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user