Skip to content

Commit

Permalink
add types
Browse files Browse the repository at this point in the history
  • Loading branch information
jameswangt23 committed Feb 27, 2020
1 parent 6cc8fef commit 802ce47
Showing 1 changed file with 22 additions and 16 deletions.
38 changes: 22 additions & 16 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ type Orientation = Readonly<{
}>;
type OrientationNumber = 1 | 2 | 3 | 4;
type AutoFocus = Readonly<{ on: any; off: any }>;
type VideoStabilization = Readonly<{off: any, standard: any, cinematic: any, auto: any}>;
type VideoStabilization = Readonly<{ off: any, standard: any, cinematic: any, auto: any }>;
type FlashMode = Readonly<{ on: any; off: any; torch: any; auto: any }>;
type CameraType = Readonly<{ front: any; back: any }>;
type WhiteBalance = Readonly<{
Expand Down Expand Up @@ -199,6 +199,9 @@ export interface RNCameraProps {
barcodes: Barcode[];
}): void;

// limiting scan area
rectOfInterest?: Point;

// -- FACE DETECTION PROPS

onFacesDetected?(response: { faces: Face[] }): void;
Expand Down Expand Up @@ -235,6 +238,9 @@ export interface RNCameraProps {
buttonNeutral?: string;
} | null;

// limiting scan area, must provide cameraViewDimensions for Android
cameraViewDimensions?: Object;

// -- IOS ONLY PROPS
videoStabilizationMode?: keyof VideoStabilization;
defaultVideoQuality?: keyof VideoQuality;
Expand Down Expand Up @@ -272,9 +278,9 @@ export interface Barcode {
firstName?: string;
lastName?: string;
middleName?: string;
prefix?:string;
pronounciation?:string;
suffix?:string;
prefix?: string;
pronounciation?: string;
suffix?: string;
formattedName?: string;
};
phone?: Phone;
Expand Down Expand Up @@ -313,18 +319,18 @@ export interface Barcode {
}

export type BarcodeType =
|"EMAIL"
|"PHONE"
|"CALENDAR_EVENT"
|"DRIVER_LICENSE"
|"GEO"
|"SMS"
|"CONTACT_INFO"
|"WIFI"
|"TEXT"
|"ISBN"
|"PRODUCT"
|"URL"
| "EMAIL"
| "PHONE"
| "CALENDAR_EVENT"
| "DRIVER_LICENSE"
| "GEO"
| "SMS"
| "CONTACT_INFO"
| "WIFI"
| "TEXT"
| "ISBN"
| "PRODUCT"
| "URL"

export interface Email {
address?: string;
Expand Down

0 comments on commit 802ce47

Please sign in to comment.