diff --git a/src/display/worker_options.js b/src/display/worker_options.js index a72fdf0a4af53f..7c836f36d53c12 100644 --- a/src/display/worker_options.js +++ b/src/display/worker_options.js @@ -13,24 +13,27 @@ * limitations under the License. */ -const GlobalWorkerOptions = Object.create(null); - /** + * @typedef {Object} GlobalWorkerOptionsType + * + * @property {Worker | null} workerPort * Defines global port for worker process. Overrides the `workerSrc` option. - * @var {Object} + * + * @property {string} workerSrc + * A string containing the path and filename of the worker file. + * + * NOTE: The `workerSrc` option should always be set, in order to prevent any + * issues when using the PDF.js library. */ + +/** @type {GlobalWorkerOptionsType} */ +const GlobalWorkerOptions = Object.create(null); + GlobalWorkerOptions.workerPort = GlobalWorkerOptions.workerPort === undefined ? null : GlobalWorkerOptions.workerPort; -/** - * A string containing the path and filename of the worker file. - * - * NOTE: The `workerSrc` option should always be set, in order to prevent any - * issues when using the PDF.js library. - * @var {string} - */ GlobalWorkerOptions.workerSrc = GlobalWorkerOptions.workerSrc === undefined ? ""