Remove createReactClass from CameraRollView

Summary:
Related to #21581

Remove createReactClass from CameraRollView.

Reviewed By: TheSavior

Differential Revision: D10351036

fbshipit-source-id: 394545ac143917e3b483dfc6186e5f45732c602a
This commit is contained in:
Ramanpreet Nara 2018-10-18 12:26:27 -07:00 committed by Facebook Github Bot
parent ede1877101
commit fd750cbd9b
1 changed files with 25 additions and 23 deletions

View File

@ -79,34 +79,36 @@ const getPhotosParamChecker = deprecatedCreateStrictShapeTypeChecker({
mimeTypes: PropTypes.arrayOf(PropTypes.string),
});
type GetPhotosReturn = Promise<{
edges: Array<{
node: {
type: string,
group_name: string,
image: {
uri: string,
height: number,
width: number,
isStored?: boolean,
playableDuration: number,
},
timestamp: number,
location?: {
latitude?: number,
longitude?: number,
altitude?: number,
heading?: number,
speed?: number,
},
export type PhotoIdentifier = {
node: {
type: string,
group_name: string,
image: {
uri: string,
height: number,
width: number,
isStored?: boolean,
playableDuration: number,
},
}>,
timestamp: number,
location?: {
latitude?: number,
longitude?: number,
altitude?: number,
heading?: number,
speed?: number,
},
},
};
export type PhotoIdentifiersPage = {
edges: Array<PhotoIdentifier>,
page_info: {
has_next_page: boolean,
start_cursor?: string,
end_cursor?: string,
},
}>;
};
/**
* Shape of the return value of the `getPhotos` function.
@ -204,7 +206,7 @@ class CameraRoll {
*
* See https://facebook.github.io/react-native/docs/cameraroll.html#getphotos
*/
static getPhotos(params: GetPhotosParams): GetPhotosReturn {
static getPhotos(params: GetPhotosParams): Promise<PhotoIdentifiersPage> {
if (__DEV__) {
checkPropTypes(
{params: getPhotosParamChecker},