mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 17:30:09 +02:00
Add typescript definitions
This PR adds typescript definitions from the JSDoc already present. It adds a new gulp-target 'types' that calls 'tsc', the typescript compiler, to create the definitions. To use the definitions, users can simply do the following: ``` import {getDocument, GlobalWorkerOptions} from "pdfjs-dist"; import pdfjsWorker from "pdfjs-dist/build/pdf.worker.entry"; GlobalWorkerOptions.workerSrc = pdfjsWorker; const pdf = await getDocument("file:///some.pdf").promise; ``` Co-authored-by: @oBusk Co-authored-by: @tamuratak
This commit is contained in:
parent
6537e64cb8
commit
f1bbfdc16d
12 changed files with 344 additions and 139 deletions
|
@ -430,6 +430,9 @@ var CanvasExtraState = (function CanvasExtraStateClosure() {
|
|||
return CanvasExtraState;
|
||||
})();
|
||||
|
||||
/**
|
||||
* @type {any}
|
||||
*/
|
||||
var CanvasGraphics = (function CanvasGraphicsClosure() {
|
||||
// Defines the time the executeOperatorList is going to be executing
|
||||
// before it stops and shedules a continue of execution.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue