Merge pull request #13450 from Snuffleupagus/getPageIndex-JSDoc

Fix the JSDocs for `PDFDocumentProxy.getPageIndex` (issue 13449)
This commit is contained in:
calixteman 2021-05-27 17:25:41 +02:00 committed by GitHub
commit d285580f48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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