Skip to content
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

Expose TextLayerRenderTask in the TypeScript definitions (issue 15016, PR 14013 follow-up) #15018

Merged
merged 1 commit into from
Jun 10, 2022

Conversation

Snuffleupagus
Copy link
Collaborator

While TextLayerRenderTask apparently makes sense in TypeScript environments, given that it's being returned by the renderTextLayer-function in the API, we really don't want to extend the public API by simply exporting the class directly in src/pdf.js since it should never be called/initialized manually.
Hence we follow the same pattern as in PR #14013, and add some very basic unit-tests to ensure that renderTextLayer always returns a TextLayerRenderTask-instance as expected.

@Snuffleupagus Snuffleupagus linked an issue Jun 10, 2022 that may be closed by this pull request
@Snuffleupagus Snuffleupagus changed the title Expose TextLayerRenderTask in TypeScript definitions (issue 15016, PR 14013 follow-up) Expose TextLayerRenderTask in the TypeScript definitions (issue 15016, PR 14013 follow-up) Jun 10, 2022
@Snuffleupagus
Copy link
Collaborator Author

/botio unittest

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_unittest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.241.84.105:8877/897ec7e3ae60e7b/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_unittest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.193.163.58:8877/cab6674c01397db/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/897ec7e3ae60e7b/output.txt

Total script time: 3.31 mins

  • Unit Tests: FAILED

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://54.193.163.58:8877/cab6674c01397db/output.txt

Total script time: 6.64 mins

  • Unit Tests: Passed

src/pdf.js Outdated Show resolved Hide resolved
…16, PR 14013 follow-up)

While `TextLayerRenderTask` apparently makes sense in TypeScript environments, given that it's being returned by the `renderTextLayer`-function in the API, we really don't want to extend the *public* API by simply exporting the class directly in `src/pdf.js` since it should never be called/initialized manually.
Hence we follow the same pattern as in PR 14013, and add some very basic unit-tests to ensure that `renderTextLayer` always returns a `TextLayerRenderTask`-instance as expected.
@timvandermeij timvandermeij merged commit a57a4bc into mozilla:master Jun 10, 2022
@timvandermeij
Copy link
Contributor

Thank you for improving this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Export TextLayerRenderTask type
3 participants