Use Template<Foo> instead of Template.<Foo>

This commit is contained in:
Tim Schaub
2018-07-25 18:37:08 -07:00
parent affbf59b77
commit 2eb07aa081
14 changed files with 50 additions and 50 deletions

View File

@@ -107,7 +107,7 @@ class Collection extends BaseObject {
* Add elements to the collection. This pushes each item in the provided array
* to the end of the collection.
* @param {!Array<T>} arr Array.
* @return {module:ol/Collection.<T>} This collection.
* @return {module:ol/Collection<T>} This collection.
* @api
*/
extend(arr) {

View File

@@ -74,10 +74,10 @@ import {create as createTransform, apply as applyTransform} from './transform.js
/**
* @typedef {Object} MapOptionsInternal
* @property {module:ol/Collection.<module:ol/control/Control>} [controls]
* @property {module:ol/Collection.<module:ol/interaction/Interaction>} [interactions]
* @property {module:ol/Collection<module:ol/control/Control>} [controls]
* @property {module:ol/Collection<module:ol/interaction/Interaction>} [interactions]
* @property {HTMLElement|Document} keyboardEventTarget
* @property {module:ol/Collection.<module:ol/Overlay>} overlays
* @property {module:ol/Collection<module:ol/Overlay>} overlays
* @property {Object<string, *>} values
*/
@@ -85,12 +85,12 @@ import {create as createTransform, apply as applyTransform} from './transform.js
/**
* Object literal with config options for the map.
* @typedef {Object} MapOptions
* @property {module:ol/Collection.<module:ol/control/Control>|Array<module:ol/control/Control>} [controls]
* @property {module:ol/Collection<module:ol/control/Control>|Array<module:ol/control/Control>} [controls]
* Controls initially added to the map. If not specified,
* {@link module:ol/control/util~defaults} is used.
* @property {number} [pixelRatio=window.devicePixelRatio] The ratio between
* physical pixels and device-independent pixels (dips) on the device.
* @property {module:ol/Collection.<module:ol/interaction/Interaction>|Array<module:ol/interaction/Interaction>} [interactions]
* @property {module:ol/Collection<module:ol/interaction/Interaction>|Array<module:ol/interaction/Interaction>} [interactions]
* Interactions that are initially added to the map. If not specified,
* {@link module:ol/interaction~defaults} is used.
* @property {HTMLElement|Document|string} [keyboardEventTarget] The element to
@@ -101,7 +101,7 @@ import {create as createTransform, apply as applyTransform} from './transform.js
* map target (i.e. the user-provided div for the map). If this is not
* `document`, the target element needs to be focused for key events to be
* emitted, requiring that the target element has a `tabindex` attribute.
* @property {Array<module:ol/layer/Base>|module:ol/Collection.<module:ol/layer/Base>} [layers]
* @property {Array<module:ol/layer/Base>|module:ol/Collection<module:ol/layer/Base>} [layers]
* Layers. If this is not defined, a map with no layers will be rendered. Note
* that layers are rendered in the order supplied, so if you want, for example,
* a vector layer to appear on top of a tile layer, it must come after the tile
@@ -118,7 +118,7 @@ import {create as createTransform, apply as applyTransform} from './transform.js
* @property {number} [moveTolerance=1] The minimum distance in pixels the
* cursor must move to be detected as a map move event instead of a click.
* Increasing this value can make it easier to click on the map.
* @property {module:ol/Collection.<module:ol/Overlay>|Array<module:ol/Overlay>} [overlays]
* @property {module:ol/Collection<module:ol/Overlay>|Array<module:ol/Overlay>} [overlays]
* Overlays initially added to the map. By default, no overlays are added.
* @property {HTMLElement|string} [target] The container for the map, either the
* element itself or the `id` of the element. If not specified at construction
@@ -310,19 +310,19 @@ class PluggableMap extends BaseObject {
listen(this.viewport_, EventType.MOUSEWHEEL, this.handleBrowserEvent, this);
/**
* @type {module:ol/Collection.<module:ol/control/Control>}
* @type {module:ol/Collection<module:ol/control/Control>}
* @protected
*/
this.controls = optionsInternal.controls || new Collection();
/**
* @type {module:ol/Collection.<module:ol/interaction/Interaction>}
* @type {module:ol/Collection<module:ol/interaction/Interaction>}
* @protected
*/
this.interactions = optionsInternal.interactions || new Collection();
/**
* @type {module:ol/Collection.<module:ol/Overlay>}
* @type {module:ol/Collection<module:ol/Overlay>}
* @private
*/
this.overlays_ = optionsInternal.overlays;
@@ -716,7 +716,7 @@ class PluggableMap extends BaseObject {
/**
* Get the map controls. Modifying this collection changes the controls
* associated with the map.
* @return {module:ol/Collection.<module:ol/control/Control>} Controls.
* @return {module:ol/Collection<module:ol/control/Control>} Controls.
* @api
*/
getControls() {
@@ -726,7 +726,7 @@ class PluggableMap extends BaseObject {
/**
* Get the map overlays. Modifying this collection changes the overlays
* associated with the map.
* @return {module:ol/Collection.<module:ol/Overlay>} Overlays.
* @return {module:ol/Collection<module:ol/Overlay>} Overlays.
* @api
*/
getOverlays() {
@@ -751,7 +751,7 @@ class PluggableMap extends BaseObject {
* associated with the map.
*
* Interactions are used for e.g. pan, zoom and rotate.
* @return {module:ol/Collection.<module:ol/interaction/Interaction>} Interactions.
* @return {module:ol/Collection<module:ol/interaction/Interaction>} Interactions.
* @api
*/
getInteractions() {
@@ -772,7 +772,7 @@ class PluggableMap extends BaseObject {
/**
* Get the collection of layers associated with this map.
* @return {!module:ol/Collection.<module:ol/layer/Base>} Layers.
* @return {!module:ol/Collection<module:ol/layer/Base>} Layers.
* @api
*/
getLayers() {

View File

@@ -44,7 +44,7 @@ const MIN_RATIO = 0.1;
* @property {boolean} [collapsible=true] Whether the control can be collapsed or not.
* @property {string|HTMLElement} [label='»'] Text label to use for the collapsed
* overviewmap button. Instead of text, also an element (e.g. a `span` element) can be used.
* @property {Array<module:ol/layer/Layer>|module:ol/Collection.<module:ol/layer/Layer>} [layers]
* @property {Array<module:ol/layer/Layer>|module:ol/Collection<module:ol/layer/Layer>} [layers]
* Layers for the overview map. If not set, then all main map layers are used
* instead.
* @property {function(module:ol/MapEvent)} [render] Function called when the control

View File

@@ -34,7 +34,7 @@ import Zoom from './Zoom.js';
*
* @param {module:ol/control/util~DefaultsOptions=} opt_options
* Defaults options.
* @return {module:ol/Collection.<module:ol/control/Control>}
* @return {module:ol/Collection<module:ol/control/Control>}
* Controls.
* @function module:ol/control.defaults
* @api

View File

@@ -77,7 +77,7 @@ export {default as Translate} from './interaction/Translate.js';
*
* @param {module:ol/interaction/Interaction~DefaultsOptions=} opt_options
* Defaults options.
* @return {module:ol/Collection.<module:ol/interaction/Interaction>}
* @return {module:ol/Collection<module:ol/interaction/Interaction>}
* A collection of interactions to be used with the {@link module:ol/Map~Map}
* constructor's `interactions` option.
* @api

View File

@@ -37,7 +37,7 @@ import {createEditingStyle} from '../style/Style.js';
* actually add a point/vertex to the geometry being drawn. The default of `6`
* was chosen for the draw interaction to behave correctly on mouse as well as
* on touch devices.
* @property {module:ol/Collection.<module:ol/Feature>} [features]
* @property {module:ol/Collection<module:ol/Feature>} [features]
* Destination collection for the drawn features.
* @property {module:ol/source/Vector} [source] Destination source for
* the drawn features.
@@ -208,7 +208,7 @@ class Draw extends PointerInteraction {
/**
* Target collection for drawn features.
* @type {module:ol/Collection.<module:ol/Feature>}
* @type {module:ol/Collection<module:ol/Feature>}
* @private
*/
this.features_ = options.features ? options.features : null;

View File

@@ -93,7 +93,7 @@ const ModifyEventType = {
* @property {module:ol/source/Vector} [source] The vector source with
* features to modify. If a vector source is not provided, a feature collection
* must be provided with the features option.
* @property {module:ol/Collection.<module:ol/Feature>} [features]
* @property {module:ol/Collection<module:ol/Feature>} [features]
* The features the interaction works on. If a feature collection is not
* provided, a vector source must be provided with the source option.
* @property {boolean} [wrapX=false] Wrap the world horizontally on the sketch
@@ -109,7 +109,7 @@ const ModifyEventType = {
export class ModifyEvent extends Event {
/**
* @param {ModifyEventType} type Type.
* @param {module:ol/Collection.<module:ol/Feature>} features
* @param {module:ol/Collection<module:ol/Feature>} features
* The features modified.
* @param {module:ol/MapBrowserPointerEvent} mapBrowserPointerEvent
* Associated {@link module:ol/MapBrowserPointerEvent}.
@@ -119,7 +119,7 @@ export class ModifyEvent extends Event {
/**
* The features being modified.
* @type {module:ol/Collection.<module:ol/Feature>}
* @type {module:ol/Collection<module:ol/Feature>}
* @api
*/
this.features = features;
@@ -230,7 +230,7 @@ class Modify extends PointerInteraction {
/**
* Segment RTree for each layer
* @type {module:ol/structs/RBush.<module:ol/interaction/Modify~SegmentData>}
* @type {module:ol/structs/RBush<module:ol/interaction/Modify~SegmentData>}
* @private
*/
this.rBush_ = new RBush();
@@ -318,7 +318,7 @@ class Modify extends PointerInteraction {
}
/**
* @type {module:ol/Collection.<module:ol/Feature>}
* @type {module:ol/Collection<module:ol/Feature>}
* @private
*/
this.features_ = features;

View File

@@ -80,7 +80,7 @@ const SelectEventType = {
* @property {boolean} [multi=false] A boolean that determines if the default
* behaviour should select only single features or all (overlapping) features at
* the clicked map position. The default of `false` means single select.
* @property {module:ol/Collection.<module:ol/Feature>} [features]
* @property {module:ol/Collection<module:ol/Feature>} [features]
* Collection where the interaction will place selected features. Optional. If
* not set the interaction will create a collection. In any case the collection
* used by the interaction is returned by
@@ -275,7 +275,7 @@ class Select extends Interaction {
/**
* Get the selected features.
* @return {module:ol/Collection.<module:ol/Feature>} Features collection.
* @return {module:ol/Collection<module:ol/Feature>} Features collection.
* @api
*/
getFeatures() {

View File

@@ -35,7 +35,7 @@ import RBush from '../structs/RBush.js';
/**
* @typedef {Object} Options
* @property {module:ol/Collection.<module:ol/Feature>} [features] Snap to these features. Either this option or source should be provided.
* @property {module:ol/Collection<module:ol/Feature>} [features] Snap to these features. Either this option or source should be provided.
* @property {boolean} [edge=true] Snap to edges.
* @property {boolean} [vertex=true] Snap to vertices.
* @property {number} [pixelTolerance=10] Pixel tolerance for considering the pointer close enough to a segment or
@@ -99,7 +99,7 @@ class Snap extends PointerInteraction {
this.edge_ = options.edge !== undefined ? options.edge : true;
/**
* @type {module:ol/Collection.<module:ol/Feature>}
* @type {module:ol/Collection<module:ol/Feature>}
* @private
*/
this.features_ = options.features ? options.features : null;
@@ -156,7 +156,7 @@ class Snap extends PointerInteraction {
/**
* Segment RTree for each layer
* @type {module:ol/structs/RBush.<module:ol/interaction/Snap~SegmentData>}
* @type {module:ol/structs/RBush<module:ol/interaction/Snap~SegmentData>}
* @private
*/
this.rBush_ = new RBush();
@@ -224,7 +224,7 @@ class Snap extends PointerInteraction {
}
/**
* @return {module:ol/Collection.<module:ol/Feature>|Array<module:ol/Feature>} Features.
* @return {module:ol/Collection<module:ol/Feature>|Array<module:ol/Feature>} Features.
* @private
*/
getFeatures_() {
@@ -235,7 +235,7 @@ class Snap extends PointerInteraction {
features = this.source_.getFeatures();
}
return (
/** @type {!Array<module:ol/Feature>|!module:ol/Collection.<module:ol/Feature>} */ (features)
/** @type {!Array<module:ol/Feature>|!module:ol/Collection<module:ol/Feature>} */ (features)
);
}

View File

@@ -38,7 +38,7 @@ const TranslateEventType = {
/**
* @typedef {Object} Options
* @property {module:ol/Collection.<module:ol/Feature>} [features] Only features contained in this collection will be able to be translated. If
* @property {module:ol/Collection<module:ol/Feature>} [features] Only features contained in this collection will be able to be translated. If
* not specified, all features on the map will be able to be translated.
* @property {Array<module:ol/layer/Layer>|function(module:ol/layer/Layer): boolean} [layers] A list of layers from which features should be
* translated. Alternatively, a filter function can be provided. The
@@ -59,7 +59,7 @@ const TranslateEventType = {
export class TranslateEvent extends Event {
/**
* @param {module:ol/interaction/Translate~TranslateEventType} type Type.
* @param {module:ol/Collection.<module:ol/Feature>} features The features translated.
* @param {module:ol/Collection<module:ol/Feature>} features The features translated.
* @param {module:ol/coordinate~Coordinate} coordinate The event coordinate.
*/
constructor(type, features, coordinate) {
@@ -68,7 +68,7 @@ export class TranslateEvent extends Event {
/**
* The features being translated.
* @type {module:ol/Collection.<module:ol/Feature>}
* @type {module:ol/Collection<module:ol/Feature>}
* @api
*/
this.features = features;
@@ -116,7 +116,7 @@ class Translate extends PointerInteraction {
/**
* @type {module:ol/Collection.<module:ol/Feature>}
* @type {module:ol/Collection<module:ol/Feature>}
* @private
*/
this.features_ = options.features !== undefined ? options.features : null;

View File

@@ -27,7 +27,7 @@ import SourceState from '../source/State.js';
* visible.
* @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will
* be visible.
* @property {Array<module:ol/layer/Base>|module:ol/Collection.<module:ol/layer/Base>} [layers] Child layers.
* @property {Array<module:ol/layer/Base>|module:ol/Collection<module:ol/layer/Base>} [layers] Child layers.
*/
@@ -161,21 +161,21 @@ class LayerGroup extends BaseLayer {
/**
* Returns the {@link module:ol/Collection collection} of {@link module:ol/layer/Layer~Layer layers}
* in this group.
* @return {!module:ol/Collection.<module:ol/layer/Base>} Collection of
* @return {!module:ol/Collection<module:ol/layer/Base>} Collection of
* {@link module:ol/layer/Base layers} that are part of this group.
* @observable
* @api
*/
getLayers() {
return (
/** @type {!module:ol/Collection.<module:ol/layer/Base>} */ (this.get(Property.LAYERS))
/** @type {!module:ol/Collection<module:ol/layer/Base>} */ (this.get(Property.LAYERS))
);
}
/**
* Set the {@link module:ol/Collection collection} of {@link module:ol/layer/Layer~Layer layers}
* in this group.
* @param {!module:ol/Collection.<module:ol/layer/Base>} layers Collection of
* @param {!module:ol/Collection<module:ol/layer/Base>} layers Collection of
* {@link module:ol/layer/Base layers} that are part of this group.
* @observable
* @api

View File

@@ -156,7 +156,7 @@ export const defaultLineWidth = 1;
/**
* The label cache for text rendering. To change the default cache size of 2048
* entries, use {@link module:ol/structs/LRUCache#setSize}.
* @type {module:ol/structs/LRUCache.<HTMLCanvasElement>}
* @type {module:ol/structs/LRUCache<HTMLCanvasElement>}
* @api
*/
export const labelCache = new LRUCache();

View File

@@ -113,7 +113,7 @@ class WebGLMapRenderer extends MapRenderer {
/**
* @private
* @type {module:ol/structs/LRUCache.<module:ol/renderer/webgl/Map~TextureCacheEntry|null>}
* @type {module:ol/structs/LRUCache<module:ol/renderer/webgl/Map~TextureCacheEntry|null>}
*/
this.textureCache_ = new LRUCache();
@@ -125,7 +125,7 @@ class WebGLMapRenderer extends MapRenderer {
/**
* @private
* @type {module:ol/structs/PriorityQueue.<Array>}
* @type {module:ol/structs/PriorityQueue<Array>}
*/
this.tileTextureQueue_ = new PriorityQueue(
/**
@@ -333,7 +333,7 @@ class WebGLMapRenderer extends MapRenderer {
}
/**
* @return {module:ol/structs/PriorityQueue.<Array>} Tile texture queue.
* @return {module:ol/structs/PriorityQueue<Array>} Tile texture queue.
*/
getTileTextureQueue() {
return this.tileTextureQueue_;

View File

@@ -61,7 +61,7 @@ export class VectorSourceEvent extends Event {
/**
* @typedef {Object} Options
* @property {module:ol/source/Source~AttributionLike} [attributions] Attributions.
* @property {Array<module:ol/Feature>|module:ol/Collection.<module:ol/Feature>} [features]
* @property {Array<module:ol/Feature>|module:ol/Collection<module:ol/Feature>} [features]
* Features. If provided as {@link module:ol/Collection}, the features in the source
* and the collection will stay in sync.
* @property {module:ol/format/Feature} [format] The feature format used by the XHR
@@ -215,13 +215,13 @@ class VectorSource extends Source {
/**
* @private
* @type {module:ol/structs/RBush.<module:ol/Feature>}
* @type {module:ol/structs/RBush<module:ol/Feature>}
*/
this.featuresRtree_ = useSpatialIndex ? new RBush() : null;
/**
* @private
* @type {module:ol/structs/RBush.<{extent: module:ol/extent~Extent}>}
* @type {module:ol/structs/RBush<{extent: module:ol/extent~Extent}>}
*/
this.loadedExtentsRtree_ = new RBush();
@@ -253,7 +253,7 @@ class VectorSource extends Source {
/**
* @private
* @type {module:ol/Collection.<module:ol/Feature>}
* @type {module:ol/Collection<module:ol/Feature>}
*/
this.featuresCollection_ = null;
@@ -417,7 +417,7 @@ VectorSource.prototype.addFeaturesInternal = function(features) {
/**
* @param {!module:ol/Collection.<module:ol/Feature>} collection Collection.
* @param {!module:ol/Collection<module:ol/Feature>} collection Collection.
* @private
*/
VectorSource.prototype.bindFeaturesCollection_ = function(collection) {
@@ -610,7 +610,7 @@ VectorSource.prototype.forEachFeatureIntersectingExtent = function(extent, callb
* Get the features collection associated with this source. Will be `null`
* unless the source was configured with `useSpatialIndex` set to `false`, or
* with an {@link module:ol/Collection} as `features`.
* @return {module:ol/Collection.<module:ol/Feature>} The collection of features.
* @return {module:ol/Collection<module:ol/Feature>} The collection of features.
* @api
*/
VectorSource.prototype.getFeaturesCollection = function() {