From 7b9445743cda4606071d1c6368d8f08d47b28398 Mon Sep 17 00:00:00 2001 From: Sirui Li Date: Thu, 31 Aug 2017 15:16:18 +0800 Subject: [PATCH] Fix Flow type default export (#99) The actual JS module only has a default export of an object with `createResizedImage` function. This PR update the Flow definition to match the usage of the module. This fixes the following flow error: ``` 18: import ImageResizer from 'react-native-image-resizer'; ^^^^^^^^^^^^ Default import from `react-native-image-resizer`. This module has no default export. ``` --- index.js.flow | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/index.js.flow b/index.js.flow index 38c49e3..402384d 100644 --- a/index.js.flow +++ b/index.js.flow @@ -6,7 +6,7 @@ declare type ResizedImageInfo = { name?: string }; -declare export function createResizedImage( +declare function createResizedImage( uri: string, width: number, height: number, @@ -16,3 +16,6 @@ declare export function createResizedImage( outputPath?: string ): Promise; +declare export default { + createResizedImage: createResizedImage +};