Skip to content

Commit

Permalink
Make sure that optional args are typed accordingly
Browse files Browse the repository at this point in the history
  • Loading branch information
ahocevar committed Feb 20, 2020
1 parent d6eb66f commit 608d515
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/ol/Collection.js
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ export class CollectionEvent extends Event {
/**
* @param {CollectionEventType} type Type.
* @param {*=} opt_element Element.
* @param {number} opt_index The index of the added or removed element.
* @param {number=} opt_index The index of the added or removed element.
*/
constructor(type, opt_element, opt_index) {
super(type);
2 changes: 1 addition & 1 deletion src/ol/format/IIIFInfo.js
Original file line number Diff line number Diff line change
@@ -349,7 +349,7 @@ class IIIFInfo {
}

/**
* @param {PreferredOptions} opt_preferredOptions Optional options for preferred format and quality.
* @param {PreferredOptions=} opt_preferredOptions Optional options for preferred format and quality.
* @returns {import("../source/IIIF.js").Options} IIIF tile source ready constructor options.
* @api
*/
2 changes: 1 addition & 1 deletion src/ol/renderer/canvas/VectorLayer.js
Original file line number Diff line number Diff line change
@@ -457,7 +457,7 @@ class CanvasVectorLayerRenderer extends CanvasLayerRenderer {
* @param {number} squaredTolerance Squared render tolerance.
* @param {import("../../style/Style.js").default|Array<import("../../style/Style.js").default>} styles The style or array of styles.
* @param {import("../../render/canvas/BuilderGroup.js").default} builderGroup Builder group.
* @param {import("../../proj.js").TransformFunction} opt_transform Transform from user to view projection.
* @param {import("../../proj.js").TransformFunction=} opt_transform Transform from user to view projection.
* @return {boolean} `true` if an image is loading.
*/
renderFeature(feature, squaredTolerance, styles, builderGroup, opt_transform) {
2 changes: 1 addition & 1 deletion src/ol/rotationconstraint.js
Original file line number Diff line number Diff line change
@@ -71,7 +71,7 @@ export function createSnapToZero(opt_tolerance) {
return (
/**
* @param {number|undefined} rotation Rotation.
* @param {boolean} opt_isMoving True if an interaction or animation is in progress.
* @param {boolean=} opt_isMoving True if an interaction or animation is in progress.
* @return {number|undefined} Rotation.
*/
function(rotation, opt_isMoving) {
2 changes: 1 addition & 1 deletion src/ol/source/IIIF.js
Original file line number Diff line number Diff line change
@@ -59,7 +59,7 @@ function formatPercentage(percentage) {
class IIIF extends TileImage {

/**
* @param {Options} opt_options Tile source options. Use {@link import("../format/IIIFInfo.js").IIIFInfo}
* @param {Options=} opt_options Tile source options. Use {@link import("../format/IIIFInfo.js").IIIFInfo}
* to parse Image API service information responses into constructor options.
* @api
*/

0 comments on commit 608d515

Please sign in to comment.