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:
Jonas Jenwald 2022-06-10 09:53:52 +02:00
parent 6e6d94ab8d
commit e046b811b7
5 changed files with 67 additions and 1 deletions

View file

@ -857,4 +857,4 @@ function renderTextLayer(renderParameters) {
return task;
}
export { renderTextLayer };
export { renderTextLayer, TextLayerRenderTask };