diff --git a/src/index.d.ts b/src/index.d.ts index 78b68cf..0827f2c 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -19,8 +19,8 @@ declare namespace Tesseract { readText(path: string, jobId?: string): Promise removeText(path: string, jobId?: string): Promise FS(method: string, args: any[], jobId?: string): Promise - loadLanguage(langs?: string, jobId?: string): Promise - initialize(langs?: string, oem?: OEM, jobId?: string): Promise + loadLanguage(langs?: string | Lang[], jobId?: string): Promise + initialize(langs?: string | Lang[], oem?: OEM, jobId?: string): Promise setParameters(params: Partial, jobId?: string): Promise recognize(image: ImageLike, options?: Partial, jobId?: string): Promise detect(image: ImageLike, jobId?: string): Promise @@ -28,6 +28,11 @@ declare namespace Tesseract { getPDF(title?: string, textonly?: boolean, jobId?: string):Promise } + interface Lang { + code: string; + data: unknown; + } + interface WorkerOptions { corePath: string langPath: string