Replace nested types by typedefs

This commit is contained in:
Simon Seyock
2021-02-02 18:03:12 +01:00
parent 808868ad1f
commit 7a155a00e7
2 changed files with 15 additions and 7 deletions

View File

@@ -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<ImageExtent>} 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.

View File

@@ -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) {