File tree 1 file changed +12
-11
lines changed
1 file changed +12
-11
lines changed Original file line number Diff line number Diff line change 13
13
* limitations under the License.
14
14
*/
15
15
16
- const GlobalWorkerOptions = Object . create ( null ) ;
17
-
18
16
/**
19
- * Defines global port for worker process. Overrides the `workerSrc` option.
20
- * @var {Object}
17
+ * @typedef {Object } GlobalWorkerOptionsType
18
+ * @property {Worker | null } workerPort - Defines global port for worker
19
+ * process. Overrides the `workerSrc` option.
20
+ * @property {string } workerSrc - A string containing the path and filename
21
+ * of the worker file.
22
+ *
23
+ * NOTE: The `workerSrc` option should always be set, in order to prevent any
24
+ * issues when using the PDF.js library.
21
25
*/
26
+
27
+ /** @type {GlobalWorkerOptionsType } */
28
+ const GlobalWorkerOptions = Object . create ( null ) ;
29
+
22
30
GlobalWorkerOptions . workerPort =
23
31
GlobalWorkerOptions . workerPort === undefined
24
32
? null
25
33
: GlobalWorkerOptions . workerPort ;
26
34
27
- /**
28
- * A string containing the path and filename of the worker file.
29
- *
30
- * NOTE: The `workerSrc` option should always be set, in order to prevent any
31
- * issues when using the PDF.js library.
32
- * @var {string}
33
- */
34
35
GlobalWorkerOptions . workerSrc =
35
36
GlobalWorkerOptions . workerSrc === undefined
36
37
? ""
You can’t perform that action at this time.
0 commit comments