Transformed types
Using the [ts.js codemod](https://gist.github.com/tschaub/1ea498c9d1e5268cf36d212b3949be4e): jscodeshift --transform ts.js src
This commit is contained in:
@@ -13,17 +13,17 @@ import ImageStyle from '../style/Image.js';
|
||||
/**
|
||||
* Specify radius for regular polygons, or radius1 and radius2 for stars.
|
||||
* @typedef {Object} Options
|
||||
* @property {module:ol/style/Fill} [fill] Fill style.
|
||||
* @property {import("./Fill.js").default} [fill] Fill style.
|
||||
* @property {number} points Number of points for stars and regular polygons. In case of a polygon, the number of points
|
||||
* is the number of sides.
|
||||
* @property {number} [radius] Radius of a regular polygon.
|
||||
* @property {number} [radius1] Outer radius of a star.
|
||||
* @property {number} [radius2] Inner radius of a star.
|
||||
* @property {number} [angle=0] Shape's angle in radians. A value of 0 will have one of the shape's point facing up.
|
||||
* @property {module:ol/style/Stroke} [stroke] Stroke style.
|
||||
* @property {import("./Stroke.js").default} [stroke] Stroke style.
|
||||
* @property {number} [rotation=0] Rotation in radians (positive rotation clockwise).
|
||||
* @property {boolean} [rotateWithView=false] Whether to rotate the shape with the view.
|
||||
* @property {module:ol/style/AtlasManager} [atlasManager] The atlas manager to use for this symbol. When
|
||||
* @property {import("./AtlasManager.js").default} [atlasManager] The atlas manager to use for this symbol. When
|
||||
* using WebGL it is recommended to use an atlas manager to avoid texture switching. If an atlas manager is given, the
|
||||
* symbol is added to an atlas. By default no atlas manager is used.
|
||||
*/
|
||||
@@ -31,7 +31,7 @@ import ImageStyle from '../style/Image.js';
|
||||
|
||||
/**
|
||||
* @typedef {Object} RenderOptions
|
||||
* @property {module:ol/colorlike~ColorLike} [strokeStyle]
|
||||
* @property {import("../colorlike.js").ColorLike} [strokeStyle]
|
||||
* @property {number} strokeWidth
|
||||
* @property {number} size
|
||||
* @property {string} lineCap
|
||||
@@ -51,7 +51,7 @@ import ImageStyle from '../style/Image.js';
|
||||
*/
|
||||
class RegularShape extends ImageStyle {
|
||||
/**
|
||||
* @param {module:ol/style/RegularShape~Options} options Options.
|
||||
* @param {Options} options Options.
|
||||
*/
|
||||
constructor(options) {
|
||||
/**
|
||||
@@ -87,7 +87,7 @@ class RegularShape extends ImageStyle {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {module:ol/style/Fill}
|
||||
* @type {import("./Fill.js").default}
|
||||
*/
|
||||
this.fill_ = options.fill !== undefined ? options.fill : null;
|
||||
|
||||
@@ -124,7 +124,7 @@ class RegularShape extends ImageStyle {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {module:ol/style/Stroke}
|
||||
* @type {import("./Stroke.js").default}
|
||||
*/
|
||||
this.stroke_ = options.stroke !== undefined ? options.stroke : null;
|
||||
|
||||
@@ -136,25 +136,25 @@ class RegularShape extends ImageStyle {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {module:ol/size~Size}
|
||||
* @type {import("../size.js").Size}
|
||||
*/
|
||||
this.size_ = null;
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {module:ol/size~Size}
|
||||
* @type {import("../size.js").Size}
|
||||
*/
|
||||
this.imageSize_ = null;
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {module:ol/size~Size}
|
||||
* @type {import("../size.js").Size}
|
||||
*/
|
||||
this.hitDetectionImageSize_ = null;
|
||||
|
||||
/**
|
||||
* @protected
|
||||
* @type {module:ol/style/AtlasManager|undefined}
|
||||
* @type {import("./AtlasManager.js").default|undefined}
|
||||
*/
|
||||
this.atlasManager_ = options.atlasManager;
|
||||
|
||||
@@ -164,7 +164,7 @@ class RegularShape extends ImageStyle {
|
||||
|
||||
/**
|
||||
* Clones the style. If an atlasmanager was provided to the original style it will be used in the cloned style, too.
|
||||
* @return {module:ol/style/RegularShape} The cloned style.
|
||||
* @return {import("./RegularShape.js").default} The cloned style.
|
||||
* @api
|
||||
*/
|
||||
clone() {
|
||||
@@ -203,7 +203,7 @@ class RegularShape extends ImageStyle {
|
||||
|
||||
/**
|
||||
* Get the fill style for the shape.
|
||||
* @return {module:ol/style/Fill} Fill style.
|
||||
* @return {import("./Fill.js").default} Fill style.
|
||||
* @api
|
||||
*/
|
||||
getFill() {
|
||||
@@ -291,7 +291,7 @@ class RegularShape extends ImageStyle {
|
||||
|
||||
/**
|
||||
* Get the stroke style for the shape.
|
||||
* @return {module:ol/style/Stroke} Stroke style.
|
||||
* @return {import("./Stroke.js").default} Stroke style.
|
||||
* @api
|
||||
*/
|
||||
getStroke() {
|
||||
@@ -315,7 +315,7 @@ class RegularShape extends ImageStyle {
|
||||
|
||||
/**
|
||||
* @protected
|
||||
* @param {module:ol/style/AtlasManager|undefined} atlasManager An atlas manager.
|
||||
* @param {import("./AtlasManager.js").default|undefined} atlasManager An atlas manager.
|
||||
*/
|
||||
render_(atlasManager) {
|
||||
let imageSize;
|
||||
@@ -359,7 +359,7 @@ class RegularShape extends ImageStyle {
|
||||
|
||||
let size = 2 * (this.radius_ + strokeWidth) + 1;
|
||||
|
||||
/** @type {module:ol/style/RegularShape~RenderOptions} */
|
||||
/** @type {RenderOptions} */
|
||||
const renderOptions = {
|
||||
strokeStyle: strokeStyle,
|
||||
strokeWidth: strokeWidth,
|
||||
@@ -421,7 +421,7 @@ class RegularShape extends ImageStyle {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @param {module:ol/style/RegularShape~RenderOptions} renderOptions Render options.
|
||||
* @param {RenderOptions} renderOptions Render options.
|
||||
* @param {CanvasRenderingContext2D} context The rendering context.
|
||||
* @param {number} x The origin for the symbol (x).
|
||||
* @param {number} y The origin for the symbol (y).
|
||||
@@ -481,7 +481,7 @@ class RegularShape extends ImageStyle {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @param {module:ol/style/RegularShape~RenderOptions} renderOptions Render options.
|
||||
* @param {RenderOptions} renderOptions Render options.
|
||||
*/
|
||||
createHitDetectionCanvas_(renderOptions) {
|
||||
this.hitDetectionImageSize_ = [renderOptions.size, renderOptions.size];
|
||||
@@ -500,7 +500,7 @@ class RegularShape extends ImageStyle {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @param {module:ol/style/RegularShape~RenderOptions} renderOptions Render options.
|
||||
* @param {RenderOptions} renderOptions Render options.
|
||||
* @param {CanvasRenderingContext2D} context The context.
|
||||
* @param {number} x The origin for the symbol (x).
|
||||
* @param {number} y The origin for the symbol (y).
|
||||
|
||||
Reference in New Issue
Block a user