Transformed types
Using the [ts.js codemod](https://gist.github.com/tschaub/1ea498c9d1e5268cf36d212b3949be4e): jscodeshift --transform ts.js src
This commit is contained in:
+3
-3
@@ -18,15 +18,15 @@ import {toString} from './color.js';
|
||||
|
||||
|
||||
/**
|
||||
* @param {module:ol/color~Color|module:ol/colorlike~ColorLike} color Color.
|
||||
* @return {module:ol/colorlike~ColorLike} The color as an {@link ol/colorlike~ColorLike}.
|
||||
* @param {import("./color.js").Color|ColorLike} color Color.
|
||||
* @return {ColorLike} The color as an {@link ol/colorlike~ColorLike}.
|
||||
* @api
|
||||
*/
|
||||
export function asColorLike(color) {
|
||||
if (isColorLike(color)) {
|
||||
return /** @type {string|CanvasPattern|CanvasGradient} */ (color);
|
||||
} else {
|
||||
return toString(/** @type {module:ol/color~Color} */ (color));
|
||||
return toString(/** @type {import("./color.js").Color} */ (color));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user