From 92bd954f62e285e6294245418ae5f4cb62f7bd93 Mon Sep 17 00:00:00 2001 From: William Schurman Date: Mon, 1 May 2017 14:48:06 -0700 Subject: [PATCH] Fix flowtype of date object in ReadDirItem This commit also upgrades flow bin to match .flowconfig version and adds a npm script to run flow check. --- FS.common.js | 6 +++--- package.json | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/FS.common.js b/FS.common.js index ac10d97..23c4d60 100644 --- a/FS.common.js +++ b/FS.common.js @@ -31,8 +31,8 @@ type MkdirOptions = { }; type ReadDirItem = { - created: date; // The creation date of the file (iOS only) - modified: date; // The last modified date of the file + created: ?Date; // The creation date of the file (iOS only) + modified: Date; // The last modified date of the file name: string; // The name of the item path: string; // The absolute path to the item size: string; // Size in bytes @@ -276,7 +276,7 @@ var RNFS = { // iOS only // Copies fotos from asset-library (camera-roll) to a specific location - // with a given width or height + // with a given width or height // @see: https://developer.apple.com/reference/photos/phimagemanager/1616964-requestimageforasset copyAssetsFileIOS(imageUri: string, destPath: string, width: number, height: number, scale : number = 1.0, compression : number = 1.0, resizeMode : string = 'contain' ): Promise { diff --git a/package.json b/package.json index 06e24f1..8f13e79 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,8 @@ "description": "Native filesystem access for react-native", "main": "FS.common.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": "echo \"Error: no test specified\" && exit 1", + "flow": "flow; test $? -eq 0 -o $? -eq 2" }, "repository": { "type": "git", @@ -28,7 +29,7 @@ "utf8": "^2.1.1" }, "devDependencies": { - "flow-bin": "0.27.0", + "flow-bin": "0.28.0", "react": "^15.4.2", "react-native": "^0.40.0" }