mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Use the RefProxy
typedef in more JSDoc comments in src/display/api.js
This commit is contained in:
parent
d7f8a0e9b9
commit
ea4b162328
1 changed files with 7 additions and 8 deletions
|
@ -114,6 +114,12 @@ function setPDFNetworkStreamFactory(pdfNetworkStreamFactory) {
|
|||
* } TypedArray
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {Object} RefProxy
|
||||
* @property {number} num
|
||||
* @property {number} gen
|
||||
*/
|
||||
|
||||
/**
|
||||
* Document initialization / loading parameters object.
|
||||
*
|
||||
|
@ -761,12 +767,6 @@ class PDFDocumentProxy {
|
|||
return this._transport.getPage(pageNumber);
|
||||
}
|
||||
|
||||
/**
|
||||
* @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,
|
||||
|
@ -1231,8 +1231,7 @@ class PDFPageProxy {
|
|||
}
|
||||
|
||||
/**
|
||||
* @type {Object} The reference that points to this page. It has `num` and
|
||||
* `gen` properties.
|
||||
* @type {RefProxy | null} The reference that points to this page.
|
||||
*/
|
||||
get ref() {
|
||||
return this._pageInfo.ref;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue