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

Commit

Permalink
fix(types): fix types for #1402
Browse files Browse the repository at this point in the history
  • Loading branch information
Felipe Constantino committed Mar 28, 2018
1 parent 3eb4159 commit 26f9a1e
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ export interface RNCameraProps {
onBarCodeRead?(event: {
data: string,
type: keyof BarCodeType,
bounds:[{x:string,y:string}]|{origin:{x:string,y:string},size:{height:string,width:string}}
/**
* @description For Android use `[Point<string>, Point<string>]`
* @description For iOS use `{ origin: Point<string>, size: Size<string> }`
*/
bounds: [Point<string>, Point<string>] | { origin: Point<string>, size: Size<string> }
}): void;

// -- FACE DETECTION PROPS
Expand Down Expand Up @@ -87,14 +91,14 @@ export interface RNCameraProps {

}

interface Point {
x: number,
y: number
interface Point<T = number> {
x: T,
y: T
}

interface Size {
width: number;
height: number;
interface Size<T = number> {
width: T;
height: T;
}

interface Face {
Expand Down

0 comments on commit 26f9a1e

Please sign in to comment.