Move the PDFDocumentStats typedef closer to its usage

Currently this typedef appears slightly out-of-place, in the middle of the arguably much more important `getDocument` JSDocs.
This commit is contained in:
Jonas Jenwald 2021-03-31 16:21:22 +02:00
parent b3528868c1
commit 9c6770748c

View File

@ -185,16 +185,6 @@ function setPDFNetworkStreamFactory(pdfNetworkStreamFactory) {
* (see `web/debugger.js`). The default value is `false`.
*/
/**
* @typedef {Object} PDFDocumentStats
* @property {Object<string, boolean>} streamTypes - Used stream types in the
* document (an item is set to true if specific stream ID was used in the
* document).
* @property {Object<string, boolean>} fontTypes - Used font types in the
* document (an item is set to true if specific font ID was used in the
* document).
*/
/**
* This is the main entry point for loading a PDF and interacting with it.
*
@ -891,6 +881,16 @@ class PDFDocumentProxy {
return this._transport.downloadInfoCapability.promise;
}
/**
* @typedef {Object} PDFDocumentStats
* @property {Object<string, boolean>} streamTypes - Used stream types in the
* document (an item is set to true if specific stream ID was used in the
* document).
* @property {Object<string, boolean>} fontTypes - Used font types in the
* document (an item is set to true if specific font ID was used in the
* document).
*/
/**
* @returns {Promise<PDFDocumentStats>} A promise this is resolved with
* current statistics about document structures (see