Replace google closure syntax = with brackets around name

This commit is contained in:
Simon Seyock
2021-02-03 14:06:02 +01:00
parent c15faa19fc
commit 8facb252f1
185 changed files with 569 additions and 569 deletions

View File

@@ -18,8 +18,8 @@ class Circle extends SimpleGeometry {
* @param {!import("../coordinate.js").Coordinate} center Center.
* For internal use, flat coordinates in combination with `opt_layout` and no
* `opt_radius` are also accepted.
* @param {number=} opt_radius Radius.
* @param {import("./GeometryLayout.js").default=} opt_layout Layout.
* @param {number} [opt_radius] Radius.
* @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
*/
constructor(center, opt_radius, opt_layout) {
super();
@@ -189,7 +189,7 @@ class Circle extends SimpleGeometry {
* number) of the circle.
* @param {!import("../coordinate.js").Coordinate} center Center.
* @param {number} radius Radius.
* @param {import("./GeometryLayout.js").default=} opt_layout Layout.
* @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
* @api
*/
setCenterAndRadius(center, radius, opt_layout) {

View File

@@ -135,7 +135,7 @@ class Geometry extends BaseObject {
* Return the closest point of the geometry to the passed point as
* {@link module:ol/coordinate~Coordinate coordinate}.
* @param {import("../coordinate.js").Coordinate} point Point.
* @param {import("../coordinate.js").Coordinate=} opt_closestPoint Closest point.
* @param {import("../coordinate.js").Coordinate} [opt_closestPoint] Closest point.
* @return {import("../coordinate.js").Coordinate} Closest point.
* @api
*/
@@ -168,7 +168,7 @@ class Geometry extends BaseObject {
/**
* Get the extent of the geometry.
* @param {import("../extent.js").Extent=} opt_extent Extent.
* @param {import("../extent.js").Extent} [opt_extent] Extent.
* @return {import("../extent.js").Extent} extent Extent.
* @api
*/
@@ -200,8 +200,8 @@ class Geometry extends BaseObject {
* coordinates in place.
* @abstract
* @param {number} sx The scaling factor in the x-direction.
* @param {number=} opt_sy The scaling factor in the y-direction (defaults to sx).
* @param {import("../coordinate.js").Coordinate=} opt_anchor The scale origin (defaults to the center
* @param {number} [opt_sy] The scaling factor in the y-direction (defaults to sx).
* @param {import("../coordinate.js").Coordinate} [opt_anchor] The scale origin (defaults to the center
* of the geometry extent).
* @api
*/

View File

@@ -20,7 +20,7 @@ import {listen, unlistenByKey} from '../events.js';
*/
class GeometryCollection extends Geometry {
/**
* @param {Array<Geometry>=} opt_geometries Geometries.
* @param {Array<Geometry>} [opt_geometries] Geometries.
*/
constructor(opt_geometries) {
super();
@@ -255,8 +255,8 @@ class GeometryCollection extends Geometry {
* coordinates in place.
* @abstract
* @param {number} sx The scaling factor in the x-direction.
* @param {number=} opt_sy The scaling factor in the y-direction (defaults to sx).
* @param {import("../coordinate.js").Coordinate=} opt_anchor The scale origin (defaults to the center
* @param {number} [opt_sy] The scaling factor in the y-direction (defaults to sx).
* @param {import("../coordinate.js").Coordinate} [opt_anchor] The scale origin (defaults to the center
* of the geometry extent).
* @api
*/

View File

@@ -25,7 +25,7 @@ class LineString extends SimpleGeometry {
/**
* @param {Array<import("../coordinate.js").Coordinate>|Array<number>} coordinates Coordinates.
* For internal use, flat coordinates in combination with `opt_layout` are also accepted.
* @param {import("./GeometryLayout.js").default=} opt_layout Layout.
* @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
*/
constructor(coordinates, opt_layout) {
super();
@@ -163,7 +163,7 @@ class LineString extends SimpleGeometry {
* return the last coordinate.
*
* @param {number} m M.
* @param {boolean=} opt_extrapolate Extrapolate. Default is `false`.
* @param {boolean} [opt_extrapolate] Extrapolate. Default is `false`.
* @return {import("../coordinate.js").Coordinate} Coordinate.
* @api
*/
@@ -204,7 +204,7 @@ class LineString extends SimpleGeometry {
* The `fraction` is a number between 0 and 1, where 0 is the start of the
* linestring and 1 is the end.
* @param {number} fraction Fraction.
* @param {import("../coordinate.js").Coordinate=} opt_dest Optional coordinate whose values will
* @param {import("../coordinate.js").Coordinate} [opt_dest] Optional coordinate whose values will
* be modified. If not provided, a new coordinate will be returned.
* @return {import("../coordinate.js").Coordinate} Coordinate of the interpolated point.
* @api
@@ -293,7 +293,7 @@ class LineString extends SimpleGeometry {
/**
* Set the coordinates of the linestring.
* @param {!Array<import("../coordinate.js").Coordinate>} coordinates Coordinates.
* @param {import("./GeometryLayout.js").default=} opt_layout Layout.
* @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
* @api
*/
setCoordinates(coordinates, opt_layout) {

View File

@@ -22,7 +22,7 @@ class LinearRing extends SimpleGeometry {
/**
* @param {Array<import("../coordinate.js").Coordinate>|Array<number>} coordinates Coordinates.
* For internal use, flat coordinates in combination with `opt_layout` are also accepted.
* @param {import("./GeometryLayout.js").default=} opt_layout Layout.
* @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
*/
constructor(coordinates, opt_layout) {
super();
@@ -167,7 +167,7 @@ class LinearRing extends SimpleGeometry {
/**
* Set the coordinates of the linear ring.
* @param {!Array<import("../coordinate.js").Coordinate>} coordinates Coordinates.
* @param {import("./GeometryLayout.js").default=} opt_layout Layout.
* @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
* @api
*/
setCoordinates(coordinates, opt_layout) {

View File

@@ -28,8 +28,8 @@ class MultiLineString extends SimpleGeometry {
* @param {Array<Array<import("../coordinate.js").Coordinate>|LineString>|Array<number>} coordinates
* Coordinates or LineString geometries. (For internal use, flat coordinates in
* combination with `opt_layout` and `opt_ends` are also accepted.)
* @param {import("./GeometryLayout.js").default=} opt_layout Layout.
* @param {Array<number>=} opt_ends Flat coordinate ends for internal use.
* @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
* @param {Array<number>} [opt_ends] Flat coordinate ends for internal use.
*/
constructor(coordinates, opt_layout, opt_ends) {
super();
@@ -165,8 +165,8 @@ class MultiLineString extends SimpleGeometry {
* LineStrings.
*
* @param {number} m M.
* @param {boolean=} opt_extrapolate Extrapolate. Default is `false`.
* @param {boolean=} opt_interpolate Interpolate. Default is `false`.
* @param {boolean} [opt_extrapolate] Extrapolate. Default is `false`.
* @param {boolean} [opt_interpolate] Interpolate. Default is `false`.
* @return {import("../coordinate.js").Coordinate} Coordinate.
* @api
*/
@@ -332,7 +332,7 @@ class MultiLineString extends SimpleGeometry {
/**
* Set the coordinates of the multilinestring.
* @param {!Array<Array<import("../coordinate.js").Coordinate>>} coordinates Coordinates.
* @param {GeometryLayout=} opt_layout Layout.
* @param {GeometryLayout} [opt_layout] Layout.
* @api
*/
setCoordinates(coordinates, opt_layout) {

View File

@@ -20,7 +20,7 @@ class MultiPoint extends SimpleGeometry {
/**
* @param {Array<import("../coordinate.js").Coordinate>|Array<number>} coordinates Coordinates.
* For internal use, flat coordinates in combination with `opt_layout` are also accepted.
* @param {import("./GeometryLayout.js").default=} opt_layout Layout.
* @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
*/
constructor(coordinates, opt_layout) {
super();
@@ -181,7 +181,7 @@ class MultiPoint extends SimpleGeometry {
/**
* Set the coordinates of the multipoint.
* @param {!Array<import("../coordinate.js").Coordinate>} coordinates Coordinates.
* @param {import("./GeometryLayout.js").default=} opt_layout Layout.
* @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
* @api
*/
setCoordinates(coordinates, opt_layout) {

View File

@@ -35,8 +35,8 @@ class MultiPolygon extends SimpleGeometry {
/**
* @param {Array<Array<Array<import("../coordinate.js").Coordinate>>|Polygon>|Array<number>} coordinates Coordinates.
* For internal use, flat coordinates in combination with `opt_layout` and `opt_endss` are also accepted.
* @param {import("./GeometryLayout.js").default=} opt_layout Layout.
* @param {Array<Array<number>>=} opt_endss Array of ends for internal use with flat coordinates.
* @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
* @param {Array<Array<number>>} [opt_endss] Array of ends for internal use with flat coordinates.
*/
constructor(coordinates, opt_layout, opt_endss) {
super();
@@ -236,7 +236,7 @@ class MultiPolygon extends SimpleGeometry {
* Get the coordinate array for this geometry. This array has the structure
* of a GeoJSON coordinate array for multi-polygons.
*
* @param {boolean=} opt_right Orient coordinates according to the right-hand
* @param {boolean} [opt_right] Orient coordinates according to the right-hand
* rule (counter-clockwise for exterior and clockwise for interior rings).
* If `false`, coordinates will be oriented according to the left-hand rule
* (clockwise for exterior and counter-clockwise for interior rings).
@@ -449,7 +449,7 @@ class MultiPolygon extends SimpleGeometry {
/**
* Set the coordinates of the multipolygon.
* @param {!Array<Array<Array<import("../coordinate.js").Coordinate>>>} coordinates Coordinates.
* @param {import("./GeometryLayout.js").default=} opt_layout Layout.
* @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
* @api
*/
setCoordinates(coordinates, opt_layout) {

View File

@@ -16,7 +16,7 @@ import {squaredDistance as squaredDx} from '../math.js';
class Point extends SimpleGeometry {
/**
* @param {import("../coordinate.js").Coordinate} coordinates Coordinates.
* @param {import("./GeometryLayout.js").default=} opt_layout Layout.
* @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
*/
constructor(coordinates, opt_layout) {
super();
@@ -100,7 +100,7 @@ class Point extends SimpleGeometry {
/**
* @param {!Array<*>} coordinates Coordinates.
* @param {import("./GeometryLayout.js").default=} opt_layout Layout.
* @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
* @api
*/
setCoordinates(coordinates, opt_layout) {

View File

@@ -35,8 +35,8 @@ class Polygon extends SimpleGeometry {
* an array of vertices' coordinates where the first coordinate and the last are
* equivalent. (For internal use, flat coordinates in combination with
* `opt_layout` and `opt_ends` are also accepted.)
* @param {import("./GeometryLayout.js").default=} opt_layout Layout.
* @param {Array<number>=} opt_ends Ends (for internal use with flat coordinates).
* @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
* @param {Array<number>} [opt_ends] Ends (for internal use with flat coordinates).
*/
constructor(coordinates, opt_layout, opt_ends) {
super();
@@ -198,7 +198,7 @@ class Polygon extends SimpleGeometry {
* Get the coordinate array for this geometry. This array has the structure
* of a GeoJSON coordinate array for polygons.
*
* @param {boolean=} opt_right Orient coordinates according to the right-hand
* @param {boolean} [opt_right] Orient coordinates according to the right-hand
* rule (counter-clockwise for exterior and clockwise for interior rings).
* If `false`, coordinates will be oriented according to the left-hand rule
* (clockwise for exterior and counter-clockwise for interior rings).
@@ -387,7 +387,7 @@ class Polygon extends SimpleGeometry {
/**
* Set the coordinates of the polygon.
* @param {!Array<Array<import("../coordinate.js").Coordinate>>} coordinates Coordinates.
* @param {import("./GeometryLayout.js").default=} opt_layout Layout.
* @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
* @api
*/
setCoordinates(coordinates, opt_layout) {
@@ -414,9 +414,9 @@ export default Polygon;
* @param {import("../coordinate.js").Coordinate} center Center (`[lon, lat]` in degrees).
* @param {number} radius The great-circle distance from the center to
* the polygon vertices in meters.
* @param {number=} opt_n Optional number of vertices for the resulting
* @param {number} [opt_n] Optional number of vertices for the resulting
* polygon. Default is `32`.
* @param {number=} opt_sphereRadius Optional radius for the sphere (defaults to
* @param {number} [opt_sphereRadius] Optional radius for the sphere (defaults to
* the Earth's mean radius using the WGS84 ellipsoid).
* @return {Polygon} The "circular" polygon.
* @api
@@ -468,8 +468,8 @@ export function fromExtent(extent) {
/**
* Create a regular polygon from a circle.
* @param {import("./Circle.js").default} circle Circle geometry.
* @param {number=} opt_sides Number of sides of the polygon. Default is 32.
* @param {number=} opt_angle Start angle for the first vertex of the polygon in
* @param {number} [opt_sides] Number of sides of the polygon. Default is 32.
* @param {number} [opt_angle] Start angle for the first vertex of the polygon in
* counter-clockwise radians. 0 means East. Default is 0.
* @return {Polygon} Polygon geometry.
* @api
@@ -499,7 +499,7 @@ export function fromCircle(circle, opt_sides, opt_angle) {
* @param {Polygon} polygon Polygon geometry.
* @param {import("../coordinate.js").Coordinate} center Center of the regular polygon.
* @param {number} radius Radius of the regular polygon.
* @param {number=} opt_angle Start angle for the first vertex of the polygon in
* @param {number} [opt_angle] Start angle for the first vertex of the polygon in
* counter-clockwise radians. 0 means East. Default is 0.
*/
export function makeRegular(polygon, center, radius, opt_angle) {

View File

@@ -164,7 +164,7 @@ class SimpleGeometry extends Geometry {
/**
* @abstract
* @param {!Array<*>} coordinates Coordinates.
* @param {import("./GeometryLayout.js").default=} opt_layout Layout.
* @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
*/
setCoordinates(coordinates, opt_layout) {
abstract();
@@ -242,8 +242,8 @@ class SimpleGeometry extends Geometry {
* Scale the geometry (with an optional origin). This modifies the geometry
* coordinates in place.
* @param {number} sx The scaling factor in the x-direction.
* @param {number=} opt_sy The scaling factor in the y-direction (defaults to sx).
* @param {import("../coordinate.js").Coordinate=} opt_anchor The scale origin (defaults to the center
* @param {number} [opt_sy] The scaling factor in the y-direction (defaults to sx).
* @param {import("../coordinate.js").Coordinate} [opt_anchor] The scale origin (defaults to the center
* of the geometry extent).
* @api
*/
@@ -333,7 +333,7 @@ export function getStrideForLayout(layout) {
/**
* @param {SimpleGeometry} simpleGeometry Simple geometry.
* @param {import("../transform.js").Transform} transform Transform.
* @param {Array<number>=} opt_dest Destination.
* @param {Array<number>} [opt_dest] Destination.
* @return {Array<number>} Transformed flat coordinates.
*/
export function transformGeom2D(simpleGeometry, transform, opt_dest) {

View File

@@ -138,7 +138,7 @@ export function multiArrayMaxSquaredDelta(
* @param {number} y Y.
* @param {Array<number>} closestPoint Closest point.
* @param {number} minSquaredDistance Minimum squared distance.
* @param {Array<number>=} opt_tmpPoint Temporary point object.
* @param {Array<number>} [opt_tmpPoint] Temporary point object.
* @return {number} Minimum squared distance.
*/
export function assignClosestPoint(
@@ -251,7 +251,7 @@ export function assignClosestPoint(
* @param {number} y Y.
* @param {Array<number>} closestPoint Closest point.
* @param {number} minSquaredDistance Minimum squared distance.
* @param {Array<number>=} opt_tmpPoint Temporary point object.
* @param {Array<number>} [opt_tmpPoint] Temporary point object.
* @return {number} Minimum squared distance.
*/
export function assignClosestArrayPoint(
@@ -299,7 +299,7 @@ export function assignClosestArrayPoint(
* @param {number} y Y.
* @param {Array<number>} closestPoint Closest point.
* @param {number} minSquaredDistance Minimum squared distance.
* @param {Array<number>=} opt_tmpPoint Temporary point object.
* @param {Array<number>} [opt_tmpPoint] Temporary point object.
* @return {number} Minimum squared distance.
*/
export function assignClosestMultiArrayPoint(

View File

@@ -43,7 +43,7 @@ export function deflateCoordinates(
* @param {number} offset Offset.
* @param {Array<Array<import("../../coordinate.js").Coordinate>>} coordinatess Coordinatess.
* @param {number} stride Stride.
* @param {Array<number>=} opt_ends Ends.
* @param {Array<number>} [opt_ends] Ends.
* @return {Array<number>} Ends.
*/
export function deflateCoordinatesArray(
@@ -74,7 +74,7 @@ export function deflateCoordinatesArray(
* @param {number} offset Offset.
* @param {Array<Array<Array<import("../../coordinate.js").Coordinate>>>} coordinatesss Coordinatesss.
* @param {number} stride Stride.
* @param {Array<Array<number>>=} opt_endss Endss.
* @param {Array<Array<number>>} [opt_endss] Endss.
* @return {Array<Array<number>>} Endss.
*/
export function deflateMultiCoordinatesArray(

View File

@@ -7,8 +7,8 @@
* @param {number} offset Offset.
* @param {number} end End.
* @param {number} stride Stride.
* @param {Array<number>=} opt_dest Destination.
* @param {number=} opt_destOffset Destination offset.
* @param {Array<number>} [opt_dest] Destination.
* @param {number} [opt_destOffset] Destination offset.
* @return {Array<number>} Flat coordinates.
*/
export function flipXY(

View File

@@ -7,7 +7,7 @@
* @param {number} offset Offset.
* @param {number} end End.
* @param {number} stride Stride.
* @param {Array<import("../../coordinate.js").Coordinate>=} opt_coordinates Coordinates.
* @param {Array<import("../../coordinate.js").Coordinate>} [opt_coordinates] Coordinates.
* @return {Array<import("../../coordinate.js").Coordinate>} Coordinates.
*/
export function inflateCoordinates(
@@ -31,7 +31,7 @@ export function inflateCoordinates(
* @param {number} offset Offset.
* @param {Array<number>} ends Ends.
* @param {number} stride Stride.
* @param {Array<Array<import("../../coordinate.js").Coordinate>>=} opt_coordinatess Coordinatess.
* @param {Array<Array<import("../../coordinate.js").Coordinate>>} [opt_coordinatess] Coordinatess.
* @return {Array<Array<import("../../coordinate.js").Coordinate>>} Coordinatess.
*/
export function inflateCoordinatesArray(
@@ -63,7 +63,7 @@ export function inflateCoordinatesArray(
* @param {number} offset Offset.
* @param {Array<Array<number>>} endss Endss.
* @param {number} stride Stride.
* @param {Array<Array<Array<import("../../coordinate.js").Coordinate>>>=} opt_coordinatesss
* @param {Array<Array<Array<import("../../coordinate.js").Coordinate>>>} [opt_coordinatesss]
* Coordinatesss.
* @return {Array<Array<Array<import("../../coordinate.js").Coordinate>>>} Coordinatesss.
*/

View File

@@ -13,7 +13,7 @@ import {numberSafeCompareFunction} from '../../array.js';
* @param {number} stride Stride.
* @param {Array<number>} flatCenters Flat centers.
* @param {number} flatCentersOffset Flat center offset.
* @param {Array<number>=} opt_dest Destination.
* @param {Array<number>} [opt_dest] Destination.
* @return {Array<number>} Destination point as XYM coordinate, where M is the
* length of the horizontal intersection that the point belongs to.
*/

View File

@@ -10,8 +10,8 @@ import {lerp} from '../../math.js';
* @param {number} end End.
* @param {number} stride Stride.
* @param {number} fraction Fraction.
* @param {Array<number>=} opt_dest Destination.
* @param {number=} opt_dimension Destination dimension (default is `2`)
* @param {Array<number>} [opt_dest] Destination.
* @param {number} [opt_dimension] Destination dimension (default is `2`)
* @return {Array<number>} Destination.
*/
export function interpolatePoint(

View File

@@ -38,7 +38,7 @@ export function linearRingIsClockwise(flatCoordinates, offset, end, stride) {
* @param {number} offset Offset.
* @param {Array<number>} ends Array of end indexes.
* @param {number} stride Stride.
* @param {boolean=} opt_right Test for right-hand orientation
* @param {boolean} [opt_right] Test for right-hand orientation
* (counter-clockwise exterior ring and clockwise interior rings).
* @return {boolean} Rings are correctly oriented.
*/
@@ -81,7 +81,7 @@ export function linearRingsAreOriented(
* @param {number} offset Offset.
* @param {Array<Array<number>>} endss Array of array of end indexes.
* @param {number} stride Stride.
* @param {boolean=} opt_right Test for right-hand orientation
* @param {boolean} [opt_right] Test for right-hand orientation
* (counter-clockwise exterior ring and clockwise interior rings).
* @return {boolean} Rings are correctly oriented.
*/
@@ -116,7 +116,7 @@ export function linearRingssAreOriented(
* @param {number} offset Offset.
* @param {Array<number>} ends Ends.
* @param {number} stride Stride.
* @param {boolean=} opt_right Follow the right-hand rule for orientation.
* @param {boolean} [opt_right] Follow the right-hand rule for orientation.
* @return {number} End.
*/
export function orientLinearRings(
@@ -157,7 +157,7 @@ export function orientLinearRings(
* @param {number} offset Offset.
* @param {Array<Array<number>>} endss Array of array of end indexes.
* @param {number} stride Stride.
* @param {boolean=} opt_right Follow the right-hand rule for orientation.
* @param {boolean} [opt_right] Follow the right-hand rule for orientation.
* @return {number} End.
*/
export function orientLinearRingsArray(

View File

@@ -36,7 +36,7 @@ import {squaredDistance, squaredSegmentDistance} from '../../math.js';
* @param {number} stride Stride.
* @param {number} squaredTolerance Squared tolerance.
* @param {boolean} highQuality Highest quality.
* @param {Array<number>=} opt_simplifiedFlatCoordinates Simplified flat
* @param {Array<number>} [opt_simplifiedFlatCoordinates] Simplified flat
* coordinates.
* @return {Array<number>} Simplified line string.
*/

View File

@@ -8,7 +8,7 @@
* @param {number} end End.
* @param {number} stride Stride.
* @param {import("../../transform.js").Transform} transform Transform.
* @param {Array<number>=} opt_dest Destination.
* @param {Array<number>} [opt_dest] Destination.
* @return {Array<number>} Transformed coordinates.
*/
export function transform2D(
@@ -40,7 +40,7 @@ export function transform2D(
* @param {number} stride Stride.
* @param {number} angle Angle.
* @param {Array<number>} anchor Rotation anchor point.
* @param {Array<number>=} opt_dest Destination.
* @param {Array<number>} [opt_dest] Destination.
* @return {Array<number>} Transformed coordinates.
*/
export function rotate(
@@ -82,7 +82,7 @@ export function rotate(
* @param {number} sx Scale factor in the x-direction.
* @param {number} sy Scale factor in the y-direction.
* @param {Array<number>} anchor Scale anchor point.
* @param {Array<number>=} opt_dest Destination.
* @param {Array<number>} [opt_dest] Destination.
* @return {Array<number>} Transformed coordinates.
*/
export function scale(
@@ -121,7 +121,7 @@ export function scale(
* @param {number} stride Stride.
* @param {number} deltaX Delta X.
* @param {number} deltaY Delta Y.
* @param {Array<number>=} opt_dest Destination.
* @param {Array<number>} [opt_dest] Destination.
* @return {Array<number>} Transformed coordinates.
*/
export function translate(