Browse Source

Updated types per #606 and #580 (#663) (#664)

dev/v4
Balearica 2 years ago committed by GitHub
parent
commit
4d3dee59b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      src/index.d.ts

6
src/index.d.ts vendored

@ -27,6 +27,7 @@ declare namespace Tesseract { @@ -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 {
@ -69,6 +70,10 @@ declare namespace Tesseract { @@ -69,6 +70,10 @@ declare namespace Tesseract {
jobId: string
data: Page
}
interface GetPDFResult {
jobId: string
data: number[]
}
interface DetectResult {
jobId: string
data: DetectData
@ -106,6 +111,7 @@ declare namespace Tesseract { @@ -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,

Loading…
Cancel
Save