-
Notifications
You must be signed in to change notification settings - Fork 10.3k
[api-minor] Fix broken/missing JSDocs and typedef
s, to allow updating TypeScript to the latest version (issue 14342)
#14373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[api-minor] Fix broken/missing JSDocs and typedef
s, to allow updating TypeScript to the latest version (issue 14342)
#14373
Conversation
5dd9c00
to
771b33f
Compare
web/interfaces.js
Outdated
/** @typedef {import("../src/display/api").PDFPageProxy} PDFPageProxy */ | ||
// eslint-disable-next-line max-len | ||
/** @typedef {import("../src/display/display_utils").PageViewport} PageViewport */ | ||
// eslint-disable-next-line max-len | ||
/** @typedef {import("./annotation_layer_builder").AnnotationLayerBuilder} AnnotationLayerBuilder */ | ||
// eslint-disable-next-line max-len | ||
/** @typedef {import("./pdf_rendering_queue").RenderingStates} RenderingStates */ | ||
// eslint-disable-next-line max-len | ||
/** @typedef {import("./struct_tree_builder").StructTreeLayerBuilder} StructTreeLayerBuilder */ | ||
/** @typedef {import("./text_highlighter").TextHighlighter} TextHighlighter */ | ||
// eslint-disable-next-line max-len | ||
/** @typedef {import("./text_layer_builder").TextLayerBuilder} TextLayerBuilder */ | ||
/** @typedef {import("./ui_utils").EventBus} EventBus */ | ||
/** @typedef {import("./xfa_layer_builder").XfaLayerBuilder} XfaLayerBuilder */ | ||
|
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/cc @michael-yx-wu @ineiti @tamuratak Would (either of) you perhaps be able to help with testing this patch?
eace896
to
aee8dc0
Compare
632af99
to
9cbede0
Compare
typedef
s, to allow updating TypeScript to the latest version (issue 14342)typedef
s, to allow updating TypeScript to the latest version (issue 14342)
9cbede0
to
51b2500
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really good to me; while unfortunate that the upgrade failed before, it at least helped to improve the documentation/types here!
…t to the latest version (issue 14342) This patch circumvents the issues seen when trying to update TypeScript to version `4.5`, by "simply" fixing the broken/missing JSDocs and `typedef`s such that `gulp typestest` now passes. As always, given that I don't really know anything about TypeScript, I cannot tell if this is a "correct" and/or proper way of doing things; we'll need TypeScript users to help out with testing! *Please note:* I'm sorry about the size of this patch, but given how intertwined all of this unfortunately is it just didn't seem easy to split this into smaller parts. However, one good thing about this TypeScript update is that it helped uncover a number of pre-existing bugs in our JSDocs comments.
…s` file This patch, first of all, removes circular dependencies in the TypeScript definitions. Secondly, it also moves `RenderingStates` into `web/ui_utils.js` to break another type-dependency and directly use the `XfaLayerBuilder` during XFA-printing. Finally, note that this patch *slightly* reduces the size of the default viewer (e.g. in the `MOZCENTRAL` build) by not having to bundle code which is completely unused.
51b2500
to
e19020c
Compare
/botio test |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/b608bf6e9da800d/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.193.163.58:8877/7a1929342b0c382/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.241.84.105:8877/b608bf6e9da800d/output.txt Total script time: 22.62 mins
Image differences available at: http://54.241.84.105:8877/b608bf6e9da800d/reftest-analyzer.html#web=eq.log |
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/7a1929342b0c382/output.txt Total script time: 35.81 mins
Image differences available at: http://54.193.163.58:8877/7a1929342b0c382/reftest-analyzer.html#web=eq.log |
/botio-windows browsertest |
From: Bot.io (Windows)ReceivedCommand cmd_browsertest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.193.163.58:8877/608d2d0209fde61/output.txt |
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/608d2d0209fde61/output.txt Total script time: 37.79 mins
Image differences available at: http://54.193.163.58:8877/608d2d0209fde61/reftest-analyzer.html#web=eq.log |
/botio-linux preview |
From: Bot.io (Linux m4)ReceivedCommand cmd_preview from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/718c8bd1d34909b/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/718c8bd1d34909b/output.txt Total script time: 4.38 mins Published |
Hopefully this PR should also help reduce the number of problems whenever someone looks into issue #14017, however we (once again) need TypeScript users to help out there! |
Thank you for doing this! It's a nice improvement and it's good that the upgrade blocker is resolved now. |
Wow - great work @Snuffleupagus ! I'm not sure I would've been able to do it in a reasonable amount of time... |
This patch circumvents the issues seen when trying to update TypeScript to version
4.5
, by "simply" fixing the broken/missing JSDocs andtypedef
s such thatgulp typestest
now passes.As always, given that I don't really know anything about TypeScript, I cannot tell if this is a "correct" and/or proper way of doing things; we'll need TypeScript users to help out with testing!
Please note: I'm sorry about the size of this patch, but given how intertwined all of this unfortunately is it just didn't seem easy to split this into smaller parts.
However, one good thing about this TypeScript update is that it helped uncover a number of pre-existing bugs in our JSDocs comments.