Skip to content

Commit

Permalink
Updated types per #606 and #580 (#663) (#664)
Browse files Browse the repository at this point in the history
  • Loading branch information
Balearica authored Sep 18, 2022
1 parent 8fb04f4 commit 4d3dee5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ declare namespace Tesseract {
threshold(image: ImageLike, options?: Partial<RecognizeOptions>, jobId?: string): Promise<RecognizeResult>
detect(image: ImageLike, jobId?: string): Promise<DetectResult>
terminate(jobId?: string): Promise<ConfigResult>
getPDF(title?: string, textonly?: boolean, jobId?: string):Promise<GetPDFResult>
}

interface WorkerOptions {
Expand Down Expand Up @@ -69,6 +70,10 @@ declare namespace Tesseract {
jobId: string
data: Page
}
interface GetPDFResult {
jobId: string
data: number[]
}
interface DetectResult {
jobId: string
data: DetectData
Expand Down Expand Up @@ -106,6 +111,7 @@ declare namespace Tesseract {
SINGLE_CHAR = '10',
SPARSE_TEXT = '11',
SPARSE_TEXT_OSD = '12',
RAW_LINE = '13'
}
const enum imageType {
ORIGINAL = 0,
Expand Down

0 comments on commit 4d3dee5

Please sign in to comment.