diff --git a/src/utils/ocr.ts b/src/utils/ocr.ts index 6c01f4a9..bcfabe84 100644 --- a/src/utils/ocr.ts +++ b/src/utils/ocr.ts @@ -5,10 +5,12 @@ import { parseMRZ } from './mrz'; let worker: Tesseract.Worker; export function runOcr(image: ImageLike): Promise; -export function runOcr void>( +export function runOcr< + CallbackFunction extends (result: RecognizeResult) => void, +>( image: ImageLike, - callback: T, -): Promise>; + callback: CallbackFunction, +): Promise>; export async function runOcr void>( image: ImageLike, callback?: T,