Skip to content

Commit

Permalink
Merge pull request #13450 from Snuffleupagus/getPageIndex-JSDoc
Browse files Browse the repository at this point in the history
Fix the JSDocs for `PDFDocumentProxy.getPageIndex` (issue 13449)
  • Loading branch information
calixteman committed May 27, 2021
2 parents f587d59 + 70c79c6 commit d285580
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/display/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -708,11 +708,15 @@ class PDFDocumentProxy {
}

/**
* @param {{num: number, gen: number}} ref - The page reference. Must have
* the `num` and `gen` properties.
* @returns {Promise<{num: number, gen: number}>} A promise that is resolved
* with the page index (starting from zero) that is associated with the
* reference.
* @typedef {Object} RefProxy
* @property {number} num
* @property {number} gen
*/

/**
* @param {RefProxy} ref - The page reference.
* @returns {Promise<number>} A promise that is resolved with the page index,
* starting from zero, that is associated with the reference.
*/
getPageIndex(ref) {
return this._transport.getPageIndex(ref);
Expand Down

0 comments on commit d285580

Please sign in to comment.