File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6767 * - disableImageHead: Disables creating the imageHead property.
6868 *
6969 * @param {Blob } file Blob object
70- * @param {Function } callback Callback fynction
70+ * @param {Function } [ callback] Callback function
7171 * @param {object } [options] Parsing options
7272 * @param {object } [data] Result data object
73- * @returns {Promise|undefined } Returns Promise if no callback is provided .
73+ * @returns {Promise<object> |undefined } Returns Promise if no callback given .
7474 */
7575 function parseMetaData ( file , callback , options , data ) {
7676 var that = this
205205 * @param {Blob } blob Blob object
206206 * @param {ArrayBuffer } head New JPEG head
207207 * @param {Function } [callback] Callback function
208- * @returns {Promise|undefined } Combined Blob
208+ * @returns {Promise<Blob|null> |undefined } Combined Blob
209209 */
210210 function replaceHead ( blob , head , callback ) {
211211 var options = { maxMetaDataSize : 256 , disableMetaDataParsers : true }
Original file line number Diff line number Diff line change 8787 return Object . prototype . toString . call ( obj ) === '[object ' + type + ']'
8888 }
8989
90+ /**
91+ * @typedef { HTMLImageElement|HTMLCanvasElement } Result
92+ */
93+
9094 /**
9195 * Loads an image for a given File object.
9296 *
9397 * @param {Blob|string } file Blob object or image URL
9498 * @param {Function|object } [callback] Image load event callback or options
9599 * @param {object } [options] Options object
96- * @returns {HTMLImageElement|HTMLCanvasElement| FileReader|Promise } Object
100+ * @returns {HTMLImageElement|FileReader|Promise<Result> } Object
97101 */
98102 function loadImage ( file , callback , options ) {
99103 /**
100104 * Promise executor
101105 *
102106 * @param {Function } resolve Resolution function
103107 * @param {Function } reject Rejection function
104- * @returns {HTMLImageElement|HTMLCanvasElement| FileReader } Object
108+ * @returns {HTMLImageElement|FileReader } Object
105109 */
106110 function executor ( resolve , reject ) {
107111 var img = document . createElement ( 'img' )
You can’t perform that action at this time.
0 commit comments