aboutsummaryrefslogtreecommitdiff
path: root/ext/js/language/dictionary-importer-media-loader.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2023-11-27 12:48:14 -0500
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2023-11-27 12:48:14 -0500
commit4da4827bcbcdd1ef163f635d9b29416ff272b0bb (patch)
treea8a0f1a8befdb78a554e1be91f2c6059ca3ad5f9 /ext/js/language/dictionary-importer-media-loader.js
parentfd6bba8a2a869eaf2b2c1fa49001f933fce3c618 (diff)
Add JSDoc type annotations to project (rebased)
Diffstat (limited to 'ext/js/language/dictionary-importer-media-loader.js')
-rw-r--r--ext/js/language/dictionary-importer-media-loader.js10
1 files changed, 1 insertions, 9 deletions
diff --git a/ext/js/language/dictionary-importer-media-loader.js b/ext/js/language/dictionary-importer-media-loader.js
index 7d4f798c..a5857dce 100644
--- a/ext/js/language/dictionary-importer-media-loader.js
+++ b/ext/js/language/dictionary-importer-media-loader.js
@@ -22,15 +22,7 @@ import {EventListenerCollection} from '../core.js';
* Class used for loading and validating media during the dictionary import process.
*/
export class DictionaryImporterMediaLoader {
- /**
- * Attempts to load an image using an ArrayBuffer and a media type to return details about it.
- * @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.
- */
+ /** @type {import('dictionary-importer-media-loader').GetImageDetailsFunction} */
getImageDetails(content, mediaType, transfer) {
return new Promise((resolve, reject) => {
const image = new Image();