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:
parent
ede1877101
commit
fd750cbd9b
|
@ -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},
|
||||
|
|
Loading…
Reference in New Issue