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;
|
let worker: Tesseract.Worker;
|
||||||
|
|
||||||
export function runOcr(image: ImageLike): Promise<void>;
|
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,
|
image: ImageLike,
|
||||||
callback: T,
|
callback: CallbackFunction,
|
||||||
): Promise<ReturnType<T>>;
|
): Promise<ReturnType<CallbackFunction>>;
|
||||||
export async function runOcr<T extends (result: RecognizeResult) => void>(
|
export async function runOcr<T extends (result: RecognizeResult) => void>(
|
||||||
image: ImageLike,
|
image: ImageLike,
|
||||||
callback?: T,
|
callback?: T,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue