Skip to content
This repository has been archived by the owner on Jun 16, 2023. It is now read-only.

Commit

Permalink
feat(types): add types for text detection feature
Browse files Browse the repository at this point in the history
  • Loading branch information
Felipe Constantino committed Mar 23, 2018
1 parent 09f808e commit c0ace2e
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ export interface RNCameraProps {
faceDetectionClassifications?: keyof FaceDetectionClassifications;

// -- ANDROID ONLY PROPS

/** Android only */
onTextRecognized?(response: { textBlocks: TrackedTextFeature[] }): void;
/** Android only */
ratio?: string;
/** Android only */
Expand All @@ -90,13 +91,15 @@ interface Point {
y: number
}

interface Size {
width: number;
height: number;
}

interface Face {
faceID?: number,
bounds: {
size: {
width: number;
height: number;
};
size: Size;
origin: Point;
};
smilingProbability?: number;
Expand All @@ -117,6 +120,16 @@ interface Face {
rollAngle?: number;
}

interface TrackedTextFeature {
type: 'block' | 'line' | 'element';
bounds: {
size: Size;
origin: Point;
},
value: string;
components: TrackedTextFeature[];
}

interface TakePictureOptions {
quality?: number;
base64?: boolean;
Expand Down

0 comments on commit c0ace2e

Please sign in to comment.