From 0ca4f785655fa34b29a8d38487d3aca020f6dfe2 Mon Sep 17 00:00:00 2001 From: Jerome Wu Date: Thu, 3 Oct 2019 13:22:11 +0800 Subject: [PATCH] Update langs in index.d.ts to be optional --- src/index.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/index.d.ts b/src/index.d.ts index b32d48f..59e8a75 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -2,8 +2,8 @@ declare namespace Tesseract { function createScheduler(): Scheduler function createWorker(options?: Partial): Worker function setLogging(logging: boolean): void - function recognize(image: ImageLike, langs: string, options?: Partial): Promise - function detect(image: ImageLike, langs: string, options?: Partial) + function recognize(image: ImageLike, langs?: string, options?: Partial): Promise + function detect(image: ImageLike, langs?: string, options?: Partial) interface Scheduler { addWorker(worker: Worker): void @@ -15,8 +15,8 @@ declare namespace Tesseract { interface Worker { load(jobId?: string): Promise - loadLanguage(langs: string, jobId?: string): Promise - initialize(langs: string, params?: Partial, jobId?: string): Promise + loadLanguage(langs?: string, jobId?: string): Promise + initialize(langs?: string, params?: Partial, jobId?: string): Promise recognize(image: ImageLike, options?: Partial, jobId?: string): Promise detect(image: ImageLike, jobId?: string): Promise terminate(jobId?: string): Promise