Use FeatureLike typedef

Use `import("./Feature.js").FeatureLike` typedef instead of `import("./Feature.js").default|import("./render/Feature.js").default`
This commit is contained in:
Frederic Junod
2018-10-02 12:58:55 +02:00
parent 023ad3c531
commit ae87cad7ef
15 changed files with 38 additions and 41 deletions

View File

@@ -546,7 +546,7 @@ class PluggableMap extends BaseObject {
* callback with each intersecting feature. Layers included in the detection can * callback with each intersecting feature. Layers included in the detection can
* be configured through the `layerFilter` option in `opt_options`. * be configured through the `layerFilter` option in `opt_options`.
* @param {import("./pixel.js").Pixel} pixel Pixel. * @param {import("./pixel.js").Pixel} pixel Pixel.
* @param {function(this: S, (import("./Feature.js").default|import("./render/Feature.js").default), * @param {function(this: S, import("./Feature.js").FeatureLike,
* import("./layer/Layer.js").default): T} callback Feature callback. The callback will be * import("./layer/Layer.js").default): T} callback Feature callback. The callback will be
* called with two arguments. The first argument is one * called with two arguments. The first argument is one
* {@link module:ol/Feature feature} or * {@link module:ol/Feature feature} or
@@ -579,7 +579,7 @@ class PluggableMap extends BaseObject {
* Get all features that intersect a pixel on the viewport. * Get all features that intersect a pixel on the viewport.
* @param {import("./pixel.js").Pixel} pixel Pixel. * @param {import("./pixel.js").Pixel} pixel Pixel.
* @param {AtPixelOptions=} opt_options Optional options. * @param {AtPixelOptions=} opt_options Optional options.
* @return {Array<import("./Feature.js").default|import("./render/Feature.js").default>} The detected features or * @return {Array<import("./Feature.js").FeatureLike>} The detected features or
* `null` if none were found. * `null` if none were found.
* @api * @api
*/ */

View File

@@ -114,7 +114,7 @@ class VectorTile extends Tile {
/** /**
* Get the features for this tile. Geometries will be in the projection returned * Get the features for this tile. Geometries will be in the projection returned
* by {@link module:ol/VectorTile~VectorTile#getProjection}. * by {@link module:ol/VectorTile~VectorTile#getProjection}.
* @return {Array<import("./Feature.js").default|import("./render/Feature.js").default>} Features. * @return {Array<import("./Feature.js").FeatureLike>} Features.
* @api * @api
*/ */
getFeatures() { getFeatures() {

View File

@@ -161,7 +161,7 @@ class MVT extends FeatureFormat {
* @param {Object} pbf PBF * @param {Object} pbf PBF
* @param {Object} rawFeature Raw Mapbox feature. * @param {Object} rawFeature Raw Mapbox feature.
* @param {import("./Feature.js").ReadOptions=} opt_options Read options. * @param {import("./Feature.js").ReadOptions=} opt_options Read options.
* @return {import("../Feature.js").default|RenderFeature} Feature. * @return {import("../Feature.js").FeatureLike} Feature.
*/ */
createFeature_(pbf, rawFeature, opt_options) { createFeature_(pbf, rawFeature, opt_options) {
const type = rawFeature.type; const type = rawFeature.type;
@@ -246,7 +246,7 @@ class MVT extends FeatureFormat {
const pbf = new PBF(/** @type {ArrayBuffer} */ (source)); const pbf = new PBF(/** @type {ArrayBuffer} */ (source));
const pbfLayers = pbf.readFields(layersPBFReader, {}); const pbfLayers = pbf.readFields(layersPBFReader, {});
/** @type {Array<import("../Feature.js").default|RenderFeature>} */ /** @type {Array<import("../Feature.js").FeatureLike>} */
const features = []; const features = [];
for (const name in pbfLayers) { for (const name in pbfLayers) {
if (layers && layers.indexOf(name) == -1) { if (layers && layers.indexOf(name) == -1) {

View File

@@ -34,8 +34,7 @@ const SelectEventType = {
* {@link module:ol/render/Feature} and an * {@link module:ol/render/Feature} and an
* {@link module:ol/layer/Layer} and returns `true` if the feature may be * {@link module:ol/layer/Layer} and returns `true` if the feature may be
* selected or `false` otherwise. * selected or `false` otherwise.
* @typedef {function((import("../Feature.js").default|import("../render/Feature.js").default), import("../layer/Layer.js").default): * @typedef {function(import("../Feature.js").FeatureLike, import("../layer/Layer.js").default):boolean} FilterFunction
* boolean} FilterFunction
*/ */
@@ -263,7 +262,7 @@ class Select extends Interaction {
} }
/** /**
* @param {import("../Feature.js").default|import("../render/Feature.js").default} feature Feature. * @param {import("../Feature.js").FeatureLike} feature Feature.
* @param {import("../layer/Layer.js").default} layer Layer. * @param {import("../layer/Layer.js").default} layer Layer.
* @private * @private
*/ */
@@ -295,7 +294,7 @@ class Select extends Interaction {
* the (last) selected feature. Note that this will not work with any * the (last) selected feature. Note that this will not work with any
* programmatic method like pushing features to * programmatic method like pushing features to
* {@link module:ol/interaction/Select~Select#getFeatures collection}. * {@link module:ol/interaction/Select~Select#getFeatures collection}.
* @param {import("../Feature.js").default|import("../render/Feature.js").default} feature Feature * @param {import("../Feature.js").FeatureLike} feature Feature
* @return {VectorLayer} Layer. * @return {VectorLayer} Layer.
* @api * @api
*/ */
@@ -370,7 +369,7 @@ class Select extends Interaction {
} }
/** /**
* @param {import("../Feature.js").default|import("../render/Feature.js").default} feature Feature. * @param {import("../Feature.js").FeatureLike} feature Feature.
* @private * @private
*/ */
removeFeatureLayerAssociation_(feature) { removeFeatureLayerAssociation_(feature) {
@@ -407,7 +406,7 @@ function handleEvent(mapBrowserEvent) {
map.forEachFeatureAtPixel(mapBrowserEvent.pixel, map.forEachFeatureAtPixel(mapBrowserEvent.pixel,
( (
/** /**
* @param {import("../Feature.js").default|import("../render/Feature.js").default} feature Feature. * @param {import("../Feature.js").FeatureLike} feature Feature.
* @param {import("../layer/Layer.js").default} layer Layer. * @param {import("../layer/Layer.js").default} layer Layer.
* @return {boolean|undefined} Continue to iterate over the features. * @return {boolean|undefined} Continue to iterate over the features.
*/ */
@@ -440,7 +439,7 @@ function handleEvent(mapBrowserEvent) {
map.forEachFeatureAtPixel(mapBrowserEvent.pixel, map.forEachFeatureAtPixel(mapBrowserEvent.pixel,
( (
/** /**
* @param {import("../Feature.js").default|import("../render/Feature.js").default} feature Feature. * @param {import("../Feature.js").FeatureLike} feature Feature.
* @param {import("../layer/Layer.js").default} layer Layer. * @param {import("../layer/Layer.js").default} layer Layer.
* @return {boolean|undefined} Continue to iterate over the features. * @return {boolean|undefined} Continue to iterate over the features.
*/ */

View File

@@ -9,7 +9,7 @@ import CanvasImmediateRenderer from './render/canvas/Immediate.js';
/** /**
* @typedef {Object} State * @typedef {Object} State
* @property {CanvasRenderingContext2D} context Canvas context that the layer is being rendered to. * @property {CanvasRenderingContext2D} context Canvas context that the layer is being rendered to.
* @property {import("./Feature.js").default|import("./render/Feature.js").default} feature * @property {import("./Feature.js").FeatureLike} feature
* @property {import("./geom/SimpleGeometry.js").default} geometry * @property {import("./geom/SimpleGeometry.js").default} geometry
* @property {number} pixelRatio Pixel ratio used by the layer renderer. * @property {number} pixelRatio Pixel ratio used by the layer renderer.
* @property {number} resolution Resolution that the render batch was created and optimized for. * @property {number} resolution Resolution that the render batch was created and optimized for.
@@ -23,8 +23,7 @@ import CanvasImmediateRenderer from './render/canvas/Immediate.js';
* It takes two instances of {@link module:ol/Feature} or * It takes two instances of {@link module:ol/Feature} or
* {@link module:ol/render/Feature} and returns a `{number}`. * {@link module:ol/render/Feature} and returns a `{number}`.
* *
* @typedef {function((import("./Feature.js").default|import("./render/Feature.js").default), * @typedef {function(import("./Feature.js").FeatureLike, import("./Feature.js").FeatureLike):number} OrderFunction
* (import("./Feature.js").default|import("./render/Feature.js").default)):number} OrderFunction
*/ */

View File

@@ -59,7 +59,7 @@ class LayerRenderer extends Observable {
* @param {import("../coordinate.js").Coordinate} coordinate Coordinate. * @param {import("../coordinate.js").Coordinate} coordinate Coordinate.
* @param {import("../PluggableMap.js").FrameState} frameState Frame state. * @param {import("../PluggableMap.js").FrameState} frameState Frame state.
* @param {number} hitTolerance Hit tolerance in pixels. * @param {number} hitTolerance Hit tolerance in pixels.
* @param {function((import("../Feature.js").default|import("../render/Feature.js").default), import("../layer/Layer.js").default): T} callback Feature callback. * @param {function(import("../Feature.js").FeatureLike, import("../layer/Layer.js").default): T} callback Feature callback.
* @return {T|void} Callback result. * @return {T|void} Callback result.
* @template T * @template T
*/ */

View File

@@ -93,7 +93,7 @@ class MapRenderer extends Disposable {
* @param {import("../coordinate.js").Coordinate} coordinate Coordinate. * @param {import("../coordinate.js").Coordinate} coordinate Coordinate.
* @param {import("../PluggableMap.js").FrameState} frameState FrameState. * @param {import("../PluggableMap.js").FrameState} frameState FrameState.
* @param {number} hitTolerance Hit tolerance in pixels. * @param {number} hitTolerance Hit tolerance in pixels.
* @param {function(this: S, (import("../Feature.js").default|import("../render/Feature.js").default), * @param {function(this: S, import("../Feature.js").FeatureLike,
* import("../layer/Layer.js").default): T} callback Feature callback. * import("../layer/Layer.js").default): T} callback Feature callback.
* @param {S} thisArg Value to use as `this` when executing `callback`. * @param {S} thisArg Value to use as `this` when executing `callback`.
* @param {function(this: U, import("../layer/Layer.js").default): boolean} layerFilter Layer filter * @param {function(this: U, import("../layer/Layer.js").default): boolean} layerFilter Layer filter
@@ -118,7 +118,7 @@ class MapRenderer extends Disposable {
const viewResolution = viewState.resolution; const viewResolution = viewState.resolution;
/** /**
* @param {import("../Feature.js").default|import("../render/Feature.js").default} feature Feature. * @param {import("../Feature.js").FeatureLike} feature Feature.
* @param {import("../layer/Layer.js").default} layer Layer. * @param {import("../layer/Layer.js").default} layer Layer.
* @return {?} Callback result. * @return {?} Callback result.
*/ */

View File

@@ -99,7 +99,7 @@ class IntermediateCanvasRenderer extends CanvasLayerRenderer {
return source.forEachFeatureAtCoordinate( return source.forEachFeatureAtCoordinate(
coordinate, resolution, rotation, hitTolerance, skippedFeatureUids, coordinate, resolution, rotation, hitTolerance, skippedFeatureUids,
/** /**
* @param {import("../../Feature.js").default|import("../../render/Feature.js").default} feature Feature. * @param {import("../../Feature.js").FeatureLike} feature Feature.
* @return {?} Callback result. * @return {?} Callback result.
*/ */
function(feature) { function(feature) {

View File

@@ -240,7 +240,7 @@ class CanvasVectorLayerRenderer extends CanvasLayerRenderer {
const features = {}; const features = {};
const result = this.replayGroup_.forEachFeatureAtCoordinate(coordinate, resolution, rotation, hitTolerance, {}, const result = this.replayGroup_.forEachFeatureAtCoordinate(coordinate, resolution, rotation, hitTolerance, {},
/** /**
* @param {import("../../Feature.js").default|import("../../render/Feature.js").default} feature Feature. * @param {import("../../Feature.js").FeatureLike} feature Feature.
* @return {?} Callback result. * @return {?} Callback result.
*/ */
function(feature) { function(feature) {

View File

@@ -182,7 +182,7 @@ class CanvasVectorTileLayerRenderer extends CanvasTileLayerRenderer {
const squaredTolerance = getSquaredRenderTolerance(resolution, pixelRatio); const squaredTolerance = getSquaredRenderTolerance(resolution, pixelRatio);
/** /**
* @param {import("../../Feature.js").default|import("../../render/Feature.js").default} feature Feature. * @param {import("../../Feature.js").FeatureLike} feature Feature.
* @this {CanvasVectorTileLayerRenderer} * @this {CanvasVectorTileLayerRenderer}
*/ */
const render = function(feature) { const render = function(feature) {
@@ -257,7 +257,7 @@ class CanvasVectorTileLayerRenderer extends CanvasTileLayerRenderer {
replayGroup = sourceTile.getReplayGroup(layer, tile.tileCoord.toString()); replayGroup = sourceTile.getReplayGroup(layer, tile.tileCoord.toString());
found = found || replayGroup.forEachFeatureAtCoordinate(coordinate, resolution, rotation, hitTolerance, {}, found = found || replayGroup.forEachFeatureAtCoordinate(coordinate, resolution, rotation, hitTolerance, {},
/** /**
* @param {import("../../Feature.js").default|import("../../render/Feature.js").default} feature Feature. * @param {import("../../Feature.js").FeatureLike} feature Feature.
* @return {?} Callback result. * @return {?} Callback result.
*/ */
function(feature) { function(feature) {
@@ -411,7 +411,7 @@ class CanvasVectorTileLayerRenderer extends CanvasTileLayerRenderer {
} }
/** /**
* @param {import("../../Feature.js").default|import("../../render/Feature.js").default} feature Feature. * @param {import("../../Feature.js").FeatureLike} feature Feature.
* @param {number} squaredTolerance Squared tolerance. * @param {number} squaredTolerance Squared tolerance.
* @param {import("../../style/Style.js").default|Array<import("../../style/Style.js").default>} styles The style or array of styles. * @param {import("../../style/Style.js").default|Array<import("../../style/Style.js").default>} styles The style or array of styles.
* @param {import("../../render/canvas/ReplayGroup.js").default} replayGroup Replay group. * @param {import("../../render/canvas/ReplayGroup.js").default} replayGroup Replay group.

View File

@@ -33,8 +33,8 @@ const GEOMETRY_RENDERERS = {
/** /**
* @param {import("../Feature.js").default|import("../render/Feature.js").default} feature1 Feature 1. * @param {import("../Feature.js").FeatureLike} feature1 Feature 1.
* @param {import("../Feature.js").default|import("../render/Feature.js").default} feature2 Feature 2. * @param {import("../Feature.js").FeatureLike} feature2 Feature 2.
* @return {number} Order. * @return {number} Order.
*/ */
export function defaultOrder(feature1, feature2) { export function defaultOrder(feature1, feature2) {
@@ -88,7 +88,7 @@ function renderCircleGeometry(replayGroup, geometry, style, feature) {
/** /**
* @param {import("../render/ReplayGroup.js").default} replayGroup Replay group. * @param {import("../render/ReplayGroup.js").default} replayGroup Replay group.
* @param {import("../Feature.js").default|import("../render/Feature.js").default} feature Feature. * @param {import("../Feature.js").FeatureLike} feature Feature.
* @param {import("../style/Style.js").default} style Style. * @param {import("../style/Style.js").default} style Style.
* @param {number} squaredTolerance Squared tolerance. * @param {number} squaredTolerance Squared tolerance.
* @param {function(this: T, import("../events/Event.js").default)} listener Listener function. * @param {function(this: T, import("../events/Event.js").default)} listener Listener function.
@@ -120,7 +120,7 @@ export function renderFeature(replayGroup, feature, style, squaredTolerance, lis
/** /**
* @param {import("../render/ReplayGroup.js").default} replayGroup Replay group. * @param {import("../render/ReplayGroup.js").default} replayGroup Replay group.
* @param {import("../Feature.js").default|import("../render/Feature.js").default} feature Feature. * @param {import("../Feature.js").FeatureLike} feature Feature.
* @param {import("../style/Style.js").default} style Style. * @param {import("../style/Style.js").default} style Style.
* @param {number} squaredTolerance Squared tolerance. * @param {number} squaredTolerance Squared tolerance.
*/ */
@@ -144,7 +144,7 @@ function renderFeatureInternal(replayGroup, feature, style, squaredTolerance) {
* @param {import("../render/ReplayGroup.js").default} replayGroup Replay group. * @param {import("../render/ReplayGroup.js").default} replayGroup Replay group.
* @param {import("../geom/Geometry.js").default} geometry Geometry. * @param {import("../geom/Geometry.js").default} geometry Geometry.
* @param {import("../style/Style.js").default} style Style. * @param {import("../style/Style.js").default} style Style.
* @param {import("../Feature.js").default|import("../render/Feature.js").default} feature Feature. * @param {import("../Feature.js").FeatureLike} feature Feature.
*/ */
function renderGeometry(replayGroup, geometry, style, feature) { function renderGeometry(replayGroup, geometry, style, feature) {
if (geometry.getType() == GeometryType.GEOMETRY_COLLECTION) { if (geometry.getType() == GeometryType.GEOMETRY_COLLECTION) {
@@ -180,7 +180,7 @@ function renderGeometryCollectionGeometry(replayGroup, geometry, style, feature)
* @param {import("../render/ReplayGroup.js").default} replayGroup Replay group. * @param {import("../render/ReplayGroup.js").default} replayGroup Replay group.
* @param {import("../geom/LineString.js").default|import("../render/Feature.js").default} geometry Geometry. * @param {import("../geom/LineString.js").default|import("../render/Feature.js").default} geometry Geometry.
* @param {import("../style/Style.js").default} style Style. * @param {import("../style/Style.js").default} style Style.
* @param {import("../Feature.js").default|import("../render/Feature.js").default} feature Feature. * @param {import("../Feature.js").FeatureLike} feature Feature.
*/ */
function renderLineStringGeometry(replayGroup, geometry, style, feature) { function renderLineStringGeometry(replayGroup, geometry, style, feature) {
const strokeStyle = style.getStroke(); const strokeStyle = style.getStroke();
@@ -202,7 +202,7 @@ function renderLineStringGeometry(replayGroup, geometry, style, feature) {
* @param {import("../render/ReplayGroup.js").default} replayGroup Replay group. * @param {import("../render/ReplayGroup.js").default} replayGroup Replay group.
* @param {import("../geom/MultiLineString.js").default|import("../render/Feature.js").default} geometry Geometry. * @param {import("../geom/MultiLineString.js").default|import("../render/Feature.js").default} geometry Geometry.
* @param {import("../style/Style.js").default} style Style. * @param {import("../style/Style.js").default} style Style.
* @param {import("../Feature.js").default|import("../render/Feature.js").default} feature Feature. * @param {import("../Feature.js").FeatureLike} feature Feature.
*/ */
function renderMultiLineStringGeometry(replayGroup, geometry, style, feature) { function renderMultiLineStringGeometry(replayGroup, geometry, style, feature) {
const strokeStyle = style.getStroke(); const strokeStyle = style.getStroke();
@@ -247,7 +247,7 @@ function renderMultiPolygonGeometry(replayGroup, geometry, style, feature) {
* @param {import("../render/ReplayGroup.js").default} replayGroup Replay group. * @param {import("../render/ReplayGroup.js").default} replayGroup Replay group.
* @param {import("../geom/Point.js").default|import("../render/Feature.js").default} geometry Geometry. * @param {import("../geom/Point.js").default|import("../render/Feature.js").default} geometry Geometry.
* @param {import("../style/Style.js").default} style Style. * @param {import("../style/Style.js").default} style Style.
* @param {import("../Feature.js").default|import("../render/Feature.js").default} feature Feature. * @param {import("../Feature.js").FeatureLike} feature Feature.
*/ */
function renderPointGeometry(replayGroup, geometry, style, feature) { function renderPointGeometry(replayGroup, geometry, style, feature) {
const imageStyle = style.getImage(); const imageStyle = style.getImage();
@@ -272,7 +272,7 @@ function renderPointGeometry(replayGroup, geometry, style, feature) {
* @param {import("../render/ReplayGroup.js").default} replayGroup Replay group. * @param {import("../render/ReplayGroup.js").default} replayGroup Replay group.
* @param {import("../geom/MultiPoint.js").default|import("../render/Feature.js").default} geometry Geometry. * @param {import("../geom/MultiPoint.js").default|import("../render/Feature.js").default} geometry Geometry.
* @param {import("../style/Style.js").default} style Style. * @param {import("../style/Style.js").default} style Style.
* @param {import("../Feature.js").default|import("../render/Feature.js").default} feature Feature. * @param {import("../Feature.js").FeatureLike} feature Feature.
*/ */
function renderMultiPointGeometry(replayGroup, geometry, style, feature) { function renderMultiPointGeometry(replayGroup, geometry, style, feature) {
const imageStyle = style.getImage(); const imageStyle = style.getImage();
@@ -297,7 +297,7 @@ function renderMultiPointGeometry(replayGroup, geometry, style, feature) {
* @param {import("../render/ReplayGroup.js").default} replayGroup Replay group. * @param {import("../render/ReplayGroup.js").default} replayGroup Replay group.
* @param {import("../geom/Polygon.js").default|import("../render/Feature.js").default} geometry Geometry. * @param {import("../geom/Polygon.js").default|import("../render/Feature.js").default} geometry Geometry.
* @param {import("../style/Style.js").default} style Style. * @param {import("../style/Style.js").default} style Style.
* @param {import("../Feature.js").default|import("../render/Feature.js").default} feature Feature. * @param {import("../Feature.js").FeatureLike} feature Feature.
*/ */
function renderPolygonGeometry(replayGroup, geometry, style, feature) { function renderPolygonGeometry(replayGroup, geometry, style, feature) {
const fillStyle = style.getFill(); const fillStyle = style.getFill();

View File

@@ -88,7 +88,7 @@ class WebGLImageLayerRenderer extends WebGLLayerRenderer {
coordinate, resolution, rotation, hitTolerance, skippedFeatureUids, coordinate, resolution, rotation, hitTolerance, skippedFeatureUids,
/** /**
* @param {import("../../Feature.js").default|import("../../render/Feature.js").default} feature Feature. * @param {import("../../Feature.js").FeatureLike} feature Feature.
* @return {?} Callback result. * @return {?} Callback result.
*/ */
function(feature) { function(feature) {

View File

@@ -124,7 +124,7 @@ class WebGLVectorLayerRenderer extends WebGLLayerRenderer {
frameState.size, frameState.pixelRatio, layerState.opacity, frameState.size, frameState.pixelRatio, layerState.opacity,
{}, {},
/** /**
* @param {import("../../Feature.js").default|import("../../render/Feature.js").default} feature Feature. * @param {import("../../Feature.js").FeatureLike} feature Feature.
* @return {?} Callback result. * @return {?} Callback result.
*/ */
function(feature) { function(feature) {

View File

@@ -188,7 +188,7 @@ class Source extends BaseObject {
* @param {number} rotation Rotation. * @param {number} rotation Rotation.
* @param {number} hitTolerance Hit tolerance in pixels. * @param {number} hitTolerance Hit tolerance in pixels.
* @param {Object<string, boolean>} skippedFeatureUids Skipped feature uids. * @param {Object<string, boolean>} skippedFeatureUids Skipped feature uids.
* @param {function((import("../Feature.js").default|import("../render/Feature.js").default)): T} callback Feature callback. * @param {function(import("../Feature.js").FeatureLike): T} callback Feature callback.
* @return {T|void} Callback result. * @return {T|void} Callback result.
* @template T * @template T
*/ */

View File

@@ -100,8 +100,7 @@ import Stroke from '../style/Stroke.js';
* {@link module:ol/style/Style} or an array of them. This way e.g. a * {@link module:ol/style/Style} or an array of them. This way e.g. a
* vector layer can be styled. * vector layer can be styled.
* *
* @typedef {function((import("../Feature.js").default|import("../render/Feature.js").default), number): * @typedef {function(import("../Feature.js").FeatureLike, number):(Style|Array<Style>)} StyleFunction
* (Style|Array<Style>)} StyleFunction
*/ */
@@ -109,7 +108,7 @@ import Stroke from '../style/Stroke.js';
* A function that takes an {@link module:ol/Feature} as argument and returns an * A function that takes an {@link module:ol/Feature} as argument and returns an
* {@link module:ol/geom/Geometry} that will be rendered and styled for the feature. * {@link module:ol/geom/Geometry} that will be rendered and styled for the feature.
* *
* @typedef {function((import("../Feature.js").default|import("../render/Feature.js").default)): * @typedef {function(import("../Feature.js").FeatureLike):
* (import("../geom/Geometry.js").default|import("../render/Feature.js").default|undefined)} GeometryFunction * (import("../geom/Geometry.js").default|import("../render/Feature.js").default|undefined)} GeometryFunction
*/ */
@@ -431,7 +430,7 @@ let defaultStyles = null;
/** /**
* @param {import("../Feature.js").default|import("../render/Feature.js").default} feature Feature. * @param {import("../Feature.js").FeatureLike} feature Feature.
* @param {number} resolution Resolution. * @param {number} resolution Resolution.
* @return {Array<Style>} Style. * @return {Array<Style>} Style.
*/ */
@@ -538,7 +537,7 @@ export function createEditingStyle() {
/** /**
* Function that is called with a feature and returns its default geometry. * Function that is called with a feature and returns its default geometry.
* @param {import("../Feature.js").default|import("../render/Feature.js").default} feature Feature to get the geometry for. * @param {import("../Feature.js").FeatureLike} feature Feature to get the geometry for.
* @return {import("../geom/Geometry.js").default|import("../render/Feature.js").default|undefined} Geometry to render. * @return {import("../geom/Geometry.js").default|import("../render/Feature.js").default|undefined} Geometry to render.
*/ */
function defaultGeometryFunction(feature) { function defaultGeometryFunction(feature) {