From f666395c24d409b6a45d76da266e9646e70cf527 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Thu, 4 Apr 2019 17:55:29 +0200 Subject: [PATCH] Remove `src/core/annotation.js` from the `gulp jsdoc` build target Note how at https://mozilla.github.io/pdf.js/api/ it's being described as API docs, however `src/core/annotation.js` is not part of the public API. Furthermore, given that the code residing in the `src/core/` folder is run in a worker-thread, it's not even accessible on the main-thread (since `postMessage` is being used to transfer the data). Hence the different API methods simply returns a "proxy" to the underlying data, but not actually the same objects and data structures as in the worker-thread itself; thus it doesn't make a whole lot of sense to expose this in API docs as far as I'm concerned. Finally, the patch fixes a small JSDoc related typo in `src/display/api.js` when referring to the `TextStyle` typedef. --- gulpfile.js | 1 - src/display/api.js | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index ffc65f1f6..d3ba9f0d3 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -950,7 +950,6 @@ gulp.task('jsdoc', function (done) { 'src/doc_helper.js', 'src/display/api.js', 'src/shared/util.js', - 'src/core/annotation.js' ]; rimraf(JSDOC_BUILD_DIR, function () { diff --git a/src/display/api.js b/src/display/api.js index 9c0a9ba0e..b2ad12f9b 100644 --- a/src/display/api.js +++ b/src/display/api.js @@ -795,7 +795,7 @@ class PDFDocumentProxy { * * @typedef {Object} TextContent * @property {array} items - array of {@link TextItem} - * @property {Object} styles - {@link TextStyles} objects, indexed by font name. + * @property {Object} styles - {@link TextStyle} objects, indexed by font name. */ /**