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 #1518 (FaCC)
Browse files Browse the repository at this point in the history
  • Loading branch information
Felipe Constantino committed Apr 26, 2018
1 parent 7653092 commit 842dc1c
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*
* If you are seeing this from the future, please, send us your cutting-edge technology :) (if it exists)
*/
import { Component } from 'react';
import { Component, ReactNode } from 'react';
import { ViewProperties } from "react-native";

type AutoFocus = { on: any, off: any };
Expand All @@ -23,8 +23,17 @@ type VideoCodec = { 'H264': symbol, 'JPEG': symbol, 'HVEC': symbol, 'AppleProRes
type FaceDetectionClassifications = { all: any, none: any };
type FaceDetectionLandmarks = { all: any, none: any };
type FaceDetectionMode = { fast: any, accurate: any };
type GoogleVisionBarcodeType = { CODE_128: any, CODE_39: any, CODABAR: any, DATA_MATRIX: any, EAN_13: any, EAN_8: any, ITF: any,
QR_CODE: any, UPC_A: any, UPC_E: any, PDF417: any, AZTEC: any }
type GoogleVisionBarcodeType = {
CODE_128: any, CODE_39: any, CODABAR: any, DATA_MATRIX: any, EAN_13: any, EAN_8: any,
ITF: any, QR_CODE: any, UPC_A: any, UPC_E: any, PDF417: any, AZTEC: any
};

// FaCC (Function as Child Components)
type CameraStatus = 'READY' | 'PENDING_AUTHORIZATION' | 'NOT_AUTHORIZED';
type FaCC = (params: {
camera: RNCamera,
status: CameraStatus
}) => JSX.Element;

export interface Constants {
AutoFocus: AutoFocus;
Expand All @@ -45,6 +54,8 @@ export interface Constants {
}

export interface RNCameraProps {
children?: ReactNode | FaCC;

autoFocus?: keyof AutoFocus;
type?: keyof CameraType;
flashMode?: keyof FlashMode;
Expand Down

0 comments on commit 842dc1c

Please sign in to comment.