mirror of
https://github.com/status-im/react-native-camera.git
synced 2026-08-27 11:41:09 +00:00
Merge pull request #1410 from react-native-community/types/fix-1402
fix(types): fix types for #1402
This commit is contained in:
Vendored
+11
-7
@@ -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
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user