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 #1547 (#1548)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fconstant authored May 7, 2018
1 parent 86125a0 commit 3ce3c80
Showing 1 changed file with 17 additions and 15 deletions.
32 changes: 17 additions & 15 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,36 @@
import { Component, ReactNode } from 'react';
import { ViewProperties } from "react-native";

type AutoFocus = { on: any, off: any };
type FlashMode = { on: any, off: any, torch: any, auto: any };
type CameraType = { front: any, back: any };
type WhiteBalance = { sunny: any, cloudy: any, shadow: any, incandescent: any, fluorescent: any, auto: any };
type BarCodeType = { aztec: any, code128: any, code39: any, code39mod43: any, code93: any, ean13: any, ean8: any, pdf417: any, qr: any, upce: any, interleaved2of5: any, itf14: any, datamatrix: any };
type VideoQuality = {
type AutoFocus = Readonly<{ on: any, off: any }>;
type FlashMode = Readonly<{ on: any, off: any, torch: any, auto: any }>;
type CameraType = Readonly<{ front: any, back: any }>;
type WhiteBalance = Readonly<{ sunny: any, cloudy: any, shadow: any, incandescent: any, fluorescent: any, auto: any }>;
type BarCodeType = Readonly<{ aztec: any, code128: any, code39: any, code39mod43: any, code93: any, ean13: any, ean8: any, pdf417: any, qr: any, upce: any, interleaved2of5: any, itf14: any, datamatrix: any }>;
type VideoQuality = Readonly<{
'2160p': any, '1080p': any, '720p': any, '480p': any, '4:3': any;
/** iOS Only. Android not supported. */
'288p': any;
};
type VideoCodec = { 'H264': symbol, 'JPEG': symbol, 'HVEC': symbol, 'AppleProRes422': symbol, 'AppleProRes4444': symbol };
}>;
type VideoCodec = Readonly<{ 'H264': symbol, 'JPEG': symbol, 'HVEC': symbol, 'AppleProRes422': symbol, 'AppleProRes4444': symbol }>;

type FaceDetectionClassifications = { all: any, none: any };
type FaceDetectionLandmarks = { all: any, none: any };
type FaceDetectionMode = { fast: any, accurate: any };
type GoogleVisionBarcodeType = {
type FaceDetectionClassifications = Readonly<{ all: any, none: any }>;
type FaceDetectionLandmarks = Readonly<{ all: any, none: any }>;
type FaceDetectionMode = Readonly<{ fast: any, accurate: any }>;
type GoogleVisionBarcodeType = Readonly<{
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 Self<T> = { [P in keyof T]: P }
type CameraStatus = Readonly<Self<{ READY, PENDING_AUTHORIZATION, NOT_AUTHORIZED }>>;
type FaCC = (params: {
camera: RNCamera,
status: CameraStatus
status: keyof CameraStatus
}) => JSX.Element;

export interface Constants {
CameraStatus: CameraStatus;
AutoFocus: AutoFocus;
FlashMode: FlashMode;
VideoCodec: VideoCodec;
Expand Down

0 comments on commit 3ce3c80

Please sign in to comment.