Skip to content

Commit

Permalink
Better types for addJob (#719)
Browse files Browse the repository at this point in the history
* Add more specific type definitions for addJob
  • Loading branch information
nathanbabcock committed Mar 27, 2023
1 parent d8c4479 commit b91cecb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ declare namespace Tesseract {

interface Scheduler {
addWorker(worker: Worker): string
addJob(action: string, ...args: any[]): Promise<ConfigResult | RecognizeResult | DetectResult>
addJob(action: 'recognize', ...args: Parameters<Worker['recognize']>): Promise<RecognizeResult>
addJob(action: 'detect', ...args: Parameters<Worker['detect']>): Promise<DetectResult>
terminate(): Promise<any>
getQueueLen(): number
getNumWorkers(): number
Expand Down

0 comments on commit b91cecb

Please sign in to comment.