Skip to content

Commit dd6c40b

Browse files
authored
Updated types per #606 and #580 (#663)
1 parent 5ff17fd commit dd6c40b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/index.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ declare namespace Tesseract {
2525
recognize(image: ImageLike, options?: Partial<RecognizeOptions>, jobId?: string): Promise<RecognizeResult>
2626
detect(image: ImageLike, jobId?: string): Promise<DetectResult>
2727
terminate(jobId?: string): Promise<ConfigResult>
28+
getPDF(title?: string, textonly?: boolean, jobId?: string):Promise<GetPDFResult>
2829
}
2930

3031
interface WorkerOptions {
@@ -62,6 +63,10 @@ declare namespace Tesseract {
6263
jobId: string
6364
data: Page
6465
}
66+
interface GetPDFResult {
67+
jobId: string
68+
data: number[]
69+
}
6570
interface DetectResult {
6671
jobId: string
6772
data: DetectData
@@ -99,6 +104,7 @@ declare namespace Tesseract {
99104
SINGLE_CHAR = '10',
100105
SPARSE_TEXT = '11',
101106
SPARSE_TEXT_OSD = '12',
107+
RAW_LINE = '13'
102108
}
103109
type ImageLike = string | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement
104110
| CanvasRenderingContext2D | File | Blob | ImageData | Buffer;

0 commit comments

Comments
 (0)