From ef260a6503257c0a4e36ed98e4c571d0b3f51b29 Mon Sep 17 00:00:00 2001 From: Balearica Date: Sat, 17 Sep 2022 14:59:47 -0700 Subject: [PATCH] Updated types per #606 and #580 --- src/index.d.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/index.d.ts b/src/index.d.ts index 2a7f265..ce697f8 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -25,6 +25,7 @@ declare namespace Tesseract { recognize(image: ImageLike, options?: Partial, jobId?: string): Promise detect(image: ImageLike, jobId?: string): Promise terminate(jobId?: string): Promise + getPDF(title?: string, textonly?: boolean, jobId?: string):Promise } interface WorkerOptions { @@ -62,6 +63,10 @@ declare namespace Tesseract { jobId: string data: Page } + interface GetPDFResult { + jobId: string + data: number[] + } interface DetectResult { jobId: string data: DetectData @@ -99,6 +104,7 @@ declare namespace Tesseract { SINGLE_CHAR = '10', SPARSE_TEXT = '11', SPARSE_TEXT_OSD = '12', + RAW_LINE = '13' } type ImageLike = string | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | CanvasRenderingContext2D | File | Blob | ImageData | Buffer;