chore: rename type
This commit is contained in:
parent
51993e97f2
commit
6858cf4103
1 changed files with 5 additions and 3 deletions
|
|
@ -5,10 +5,12 @@ import { parseMRZ } from './mrz';
|
|||
let worker: Tesseract.Worker;
|
||||
|
||||
export function runOcr(image: ImageLike): Promise<void>;
|
||||
export function runOcr<T extends (result: RecognizeResult) => void>(
|
||||
export function runOcr<
|
||||
CallbackFunction extends (result: RecognizeResult) => void,
|
||||
>(
|
||||
image: ImageLike,
|
||||
callback: T,
|
||||
): Promise<ReturnType<T>>;
|
||||
callback: CallbackFunction,
|
||||
): Promise<ReturnType<CallbackFunction>>;
|
||||
export async function runOcr<T extends (result: RecognizeResult) => void>(
|
||||
image: ImageLike,
|
||||
callback?: T,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue