[!NOTE]
Merge #4 and #5 in one. Sorry for the mess
Adds types for the result/return of scanText
Replaces the current return type of the function with TextDataMap interface
before
const data: object = scanText(frame, options);
after
export type TextData = {
blockFrameBottom: number
blockFrameLeft: number
blockFrameRight: number
blockFrameTop: number
blockText: string
elementFrameBottom: number
elementFrameLeft: number
elementFrameRight: number
elementFrameTop: number
elementText: string
lineFrameBottom: number
lineFrameLeft: number
lineFrameRight: number
lineFrameTop: number
lineText: string
resultText: string
size: number
}
export type TextDataMap = {
[key: number]: TextData
}
Adds types for the result/return of
scanText
Replaces the current return type of the function withTextDataMap
interfacebefore
after
Adds
TextDataMap
incallback
usage