Skip to content

Commit

Permalink
feat(index.d.ts): add type for logger args (#778)
Browse files Browse the repository at this point in the history
  • Loading branch information
l2ysho committed Jun 15, 2023
1 parent eeb08a4 commit f346717
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@ declare namespace Tesseract {
load_number_dawg: string
load_bigram_dawg: string
}

type LoggerMessage = {
jobId: string
progress: number
status: string
userJobId: string
workerId: string
}

interface WorkerOptions {
corePath: string
langPath: string
Expand All @@ -52,7 +61,7 @@ declare namespace Tesseract {
cacheMethod: string
workerBlobURL: boolean
gzip: boolean
logger: (arg: any) => void,
logger: (arg: LoggerMessage) => void,
errorHandler: (arg: any) => void
}
interface WorkerParams {
Expand Down

0 comments on commit f346717

Please sign in to comment.