From 7a155a00e71e01ed9dcb73d7b9253402a4e5e11c Mon Sep 17 00:00:00 2001 From: Simon Seyock Date: Tue, 2 Feb 2021 18:03:12 +0100 Subject: [PATCH] Replace nested types by typedefs --- src/ol/reproj.js | 13 ++++++++----- test/test-extensions.js | 9 +++++++-- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/ol/reproj.js b/src/ol/reproj.js index bedaa3d148..5bdefac6bc 100644 --- a/src/ol/reproj.js +++ b/src/ol/reproj.js @@ -178,6 +178,12 @@ export function calculateSourceExtentResolution( return sourceResolution; } +/** + * @typedef {Object} ImageExtent + * @property {import("./extent.js").Extent} extent + * @property {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} image + */ + /** * Renders the source data into new canvas based on the triangulation. * @@ -188,11 +194,8 @@ export function calculateSourceExtentResolution( * @param {import("./extent.js").Extent} sourceExtent Extent of the data source. * @param {number} targetResolution Target resolution. * @param {import("./extent.js").Extent} targetExtent Target extent. - * @param {import("./reproj/Triangulation.js").default} triangulation - * Calculated triangulation. - * @param {Array<{extent: import("./extent.js").Extent, - * image: (HTMLCanvasElement|HTMLImageElement|HTMLVideoElement)}>} sources - * Array of sources. + * @param {import("./reproj/Triangulation.js").default} triangulation Calculated triangulation. + * @param {Array} sources Array of sources. * @param {number} gutter Gutter of the sources. * @param {boolean=} opt_renderEdges Render reprojection edges. * @param {object=} opt_contextOptions Properties to set on the canvas context. diff --git a/test/test-extensions.js b/test/test-extensions.js index 764baa8744..e521b011f6 100644 --- a/test/test-extensions.js +++ b/test/test-extensions.js @@ -331,11 +331,16 @@ } } + /** + * @typedef {Object} xmleqlOptions + * @property {boolean} [includeWhiteSpace] + * @property {boolean} [ignoreElementOrder] + */ + /** * Checks if the XML document sort of equals another XML document. * @param {Object} obj The other object. - * @param {{includeWhiteSpace: (boolean|undefined), - * ignoreElementOrder: (boolean|undefined)}=} options The options. + * @param {xmleqlOptions} [options] The options. * @return {expect.Assertion} The assertion. */ expect.Assertion.prototype.xmleql = function (obj, options) {