From 31e20c889e467aa4ba64b0b5baf602adc1359371 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Fri, 20 May 2022 10:28:38 -0400 Subject: ESlint JSdoc (#2148) * Install eslint-plugin-jsdoc * Initial rules setup * Update lists * Use @returns rather than @return * Remove error throwing code which is never executed * Fix issues relating to @throws * General error fixes * Update Display type documentation * Various doc fixes * Fix invalid tuple syntax * Doc updates * Remove unused * Doc updates * Enable jsdoc/require-returns * Update rules * Update remaining rules --- ext/js/language/dictionary-importer-media-loader.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'ext/js/language/dictionary-importer-media-loader.js') diff --git a/ext/js/language/dictionary-importer-media-loader.js b/ext/js/language/dictionary-importer-media-loader.js index 69a27f71..ce03ab20 100644 --- a/ext/js/language/dictionary-importer-media-loader.js +++ b/ext/js/language/dictionary-importer-media-loader.js @@ -21,9 +21,12 @@ class DictionaryImporterMediaLoader { /** * Attempts to load an image using an ArrayBuffer and a media type to return details about it. - * @param content The binary content for the image, encoded as an ArrayBuffer. - * @param mediaType The media type for the image content. - * @returns A Promise which resolves with {content, width, height} on success, otherwise an error is thrown. + * @param {ArrayBuffer} content The binary content for the image, encoded as an ArrayBuffer. + * @param {string} mediaType The media type for the image content. + * @param {Transferable[]} [transfer] An optional array of data that should be transferred in `postMessage` calls. + * When the resulting promise resolves, this array will contain the `content` object. + * @returns {Promise<{content: ArrayBuffer, width: number, height: number}>} Details about the requested image content. + * @throws {Error} An error can be thrown if the image fails to load. */ getImageDetails(content, mediaType, transfer) { return new Promise((resolve, reject) => { -- cgit v1.2.3