From 274e7ba5926574a1d570cfb6062bdf2c0fbd9a93 Mon Sep 17 00:00:00 2001 From: Charles Chen Date: Thu, 16 Feb 2017 15:01:56 -0800 Subject: [PATCH] Make flow types update to date with proptypes with ImageSource Summary: As the task covered, we would like to update the ImageSource flow type. Edit the flow types for ImageSource to map to the propTypes ImageSourcePropType.js Reviewed By: mmmulani Differential Revision: D4573836 fbshipit-source-id: ef3f5365e00b4926c75188f345811f5cfa4bfd3c --- Libraries/Image/ImageSource.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/Libraries/Image/ImageSource.js b/Libraries/Image/ImageSource.js index 0ece6586f..57e38da0f 100644 --- a/Libraries/Image/ImageSource.js +++ b/Libraries/Image/ImageSource.js @@ -11,6 +11,18 @@ */ 'use strict'; -export type ImageSource = { +// This is to sync with ImageSourcePropTypes.js. + +type ImageURISource = { uri?: string, -} | number; + bundle?: string, + method?: string, + headers?: Object, + body?: string, + cache?: 'default' | 'reload' | 'force-cache' | 'only-if-cached', + width?: number, + height?: number, + scale?: number, +}; + +export type ImageSource = ImageURISource | number | Array;