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

Commit 7eb69ad

Browse files
maxschmelingn1ru4l
authored andcommitted
fix: export CameraStatus constant (#1952)
* Adds typing to CameraStatus constant. * Fixed typo * Exports Status type from RNCamera. * Adds @flow to index and exports CameraStatus type. * Fixed type export syntax. Co-Authored-By: maxschmeling <max@maxschmeling.me> * Fixed type name collision. Co-Authored-By: maxschmeling <max@maxschmeling.me> * fix export
1 parent 50157fe commit 7eb69ad

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

src/RNCamera.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@ type StateType = {
111111
isAuthorizationChecked: boolean,
112112
};
113113

114-
type Status = 'READY' | 'PENDING_AUTHORIZATION' | 'NOT_AUTHORIZED';
114+
export type Status = 'READY' | 'PENDING_AUTHORIZATION' | 'NOT_AUTHORIZED';
115115

116-
const CameraStatus = {
116+
const CameraStatus: { [key: Status]: Status } = {
117117
READY: 'READY',
118118
PENDING_AUTHORIZATION: 'PENDING_AUTHORIZATION',
119119
NOT_AUTHORIZED: 'NOT_AUTHORIZED',

src/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1+
// @flow
2+
13
import Camera from './Camera';
2-
import RNCamera from './RNCamera';
4+
import RNCamera, { type Status as _CameraStatus } from './RNCamera';
35
import FaceDetector from './FaceDetector';
46

7+
export type CameraStatus = _CameraStatus;
58
export { RNCamera, FaceDetector };
69

710
export default Camera;

0 commit comments

Comments
 (0)