From 6858cf4103273c55aae9fbe18b199b6ab5a2c1bd Mon Sep 17 00:00:00 2001 From: Methapon Metanipat Date: Wed, 2 Oct 2024 17:06:57 +0700 Subject: [PATCH] chore: rename type --- src/utils/ocr.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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,