mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 17:30:09 +02:00
Expose TextLayerRenderTask
in the TypeScript definitions (issue 15016, 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.
This commit is contained in:
parent
6e6d94ab8d
commit
e046b811b7
5 changed files with 67 additions and 1 deletions
|
@ -857,4 +857,4 @@ function renderTextLayer(renderParameters) {
|
|||
return task;
|
||||
}
|
||||
|
||||
export { renderTextLayer };
|
||||
export { renderTextLayer, TextLayerRenderTask };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue