Use the RefProxy
typedef in more JSDoc comments in src/display/api.js
This commit is contained in:
parent
d7f8a0e9b9
commit
ea4b162328
@ -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…
Reference in New Issue
Block a user