diff --git a/.flowconfig b/.flowconfig index 0bd9289ff..d265903cf 100644 --- a/.flowconfig +++ b/.flowconfig @@ -100,4 +100,4 @@ untyped-import untyped-type-import [version] -^0.78.0 +^0.79.1 diff --git a/.flowconfig.android b/.flowconfig.android index e3741c8d4..30ac6c928 100644 --- a/.flowconfig.android +++ b/.flowconfig.android @@ -100,4 +100,4 @@ untyped-import untyped-type-import [version] -^0.78.0 +^0.79.1 diff --git a/Libraries/Core/Timers/JSTimers.js b/Libraries/Core/Timers/JSTimers.js index 7cffb4e3d..6e4ab38a7 100644 --- a/Libraries/Core/Timers/JSTimers.js +++ b/Libraries/Core/Timers/JSTimers.js @@ -290,6 +290,9 @@ const JSTimers = { * @param {function} func Callback to be invoked before the end of the * current JavaScript execution loop. */ + /* $FlowFixMe(>=0.79.1 site=react_native_fb) This comment suppresses an + * error found when Flow v0.79 was deployed. To see the error delete this + * comment and run Flow. */ setImmediate: function(func: Function, ...args: any) { const id = _allocateCallback( () => func.apply(undefined, args), @@ -302,6 +305,9 @@ const JSTimers = { /** * @param {function} func Callback to be invoked every frame. */ + /* $FlowFixMe(>=0.79.1 site=react_native_fb) This comment suppresses an + * error found when Flow v0.79 was deployed. To see the error delete this + * comment and run Flow. */ requestAnimationFrame: function(func: Function) { const id = _allocateCallback(func, 'requestAnimationFrame'); Timing.createTimer(id, 1, Date.now(), /* recurring */ false); @@ -313,6 +319,9 @@ const JSTimers = { * with time remaining in frame. * @param {?object} options */ + /* $FlowFixMe(>=0.79.1 site=react_native_fb) This comment suppresses an + * error found when Flow v0.79 was deployed. To see the error delete this + * comment and run Flow. */ requestIdleCallback: function(func: Function, options: ?Object) { if (requestIdleCallbacks.length === 0) { Timing.setSendIdleEvents(true); @@ -351,6 +360,9 @@ const JSTimers = { return id; }, + /* $FlowFixMe(>=0.79.1 site=react_native_fb) This comment suppresses an + * error found when Flow v0.79 was deployed. To see the error delete this + * comment and run Flow. */ cancelIdleCallback: function(timerID: number) { _freeCallback(timerID); const index = requestIdleCallbacks.indexOf(timerID); @@ -369,14 +381,23 @@ const JSTimers = { } }, + /* $FlowFixMe(>=0.79.1 site=react_native_fb) This comment suppresses an + * error found when Flow v0.79 was deployed. To see the error delete this + * comment and run Flow. */ clearTimeout: function(timerID: number) { _freeCallback(timerID); }, + /* $FlowFixMe(>=0.79.1 site=react_native_fb) This comment suppresses an + * error found when Flow v0.79 was deployed. To see the error delete this + * comment and run Flow. */ clearInterval: function(timerID: number) { _freeCallback(timerID); }, + /* $FlowFixMe(>=0.79.1 site=react_native_fb) This comment suppresses an + * error found when Flow v0.79 was deployed. To see the error delete this + * comment and run Flow. */ clearImmediate: function(timerID: number) { _freeCallback(timerID); const index = immediates.indexOf(timerID); @@ -385,6 +406,9 @@ const JSTimers = { } }, + /* $FlowFixMe(>=0.79.1 site=react_native_fb) This comment suppresses an + * error found when Flow v0.79 was deployed. To see the error delete this + * comment and run Flow. */ cancelAnimationFrame: function(timerID: number) { _freeCallback(timerID); }, @@ -393,6 +417,9 @@ const JSTimers = { * This is called from the native side. We are passed an array of timerIDs, * and */ + /* $FlowFixMe(>=0.79.1 site=react_native_fb) This comment suppresses an + * error found when Flow v0.79 was deployed. To see the error delete this + * comment and run Flow. */ callTimers: function(timersToCall: Array) { invariant( timersToCall.length !== 0, @@ -423,6 +450,9 @@ const JSTimers = { } }, + /* $FlowFixMe(>=0.79.1 site=react_native_fb) This comment suppresses an + * error found when Flow v0.79 was deployed. To see the error delete this + * comment and run Flow. */ callIdleCallbacks: function(frameTime: number) { if ( FRAME_DURATION - (performanceNow() - frameTime) < @@ -459,6 +489,9 @@ const JSTimers = { * This is called after we execute any command we receive from native but * before we hand control back to native. */ + /* $FlowFixMe(>=0.79.1 site=react_native_fb) This comment suppresses an + * error found when Flow v0.79 was deployed. To see the error delete this + * comment and run Flow. */ callImmediates() { errors = null; while (_callImmediatesPass()) {} @@ -474,6 +507,9 @@ const JSTimers = { /** * Called from native (in development) when environment times are out-of-sync. */ + /* $FlowFixMe(>=0.79.1 site=react_native_fb) This comment suppresses an + * error found when Flow v0.79 was deployed. To see the error delete this + * comment and run Flow. */ emitTimeDriftWarning(warningMessage: string) { if (hasEmittedTimeDriftWarning) { return; diff --git a/RNTester/js/ScrollViewExample.js b/RNTester/js/ScrollViewExample.js index 6a15ae252..60100391a 100644 --- a/RNTester/js/ScrollViewExample.js +++ b/RNTester/js/ScrollViewExample.js @@ -121,14 +121,8 @@ exports.examples = [ return ( - {/* $FlowFixMe(>=0.70.0 site=react_native_fb) This comment - * suppresses an error found when Flow v0.70 was deployed. To see - * the error delete this comment and run Flow. */ - renderScrollView('LTR layout', {direction: 'ltr'})} - {/* $FlowFixMe(>=0.70.0 site=react_native_fb) This comment - * suppresses an error found when Flow v0.70 was deployed. To see - * the error delete this comment and run Flow. */ - renderScrollView('RTL layout', {direction: 'rtl'})} + {renderScrollView('LTR layout', {direction: 'ltr'})} + {renderScrollView('RTL layout', {direction: 'rtl'})} ); }, diff --git a/local-cli/templates/HelloWorld/_flowconfig b/local-cli/templates/HelloWorld/_flowconfig index 1043c82d7..ea86c4608 100644 --- a/local-cli/templates/HelloWorld/_flowconfig +++ b/local-cli/templates/HelloWorld/_flowconfig @@ -67,4 +67,4 @@ suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError [version] -^0.78.0 +^0.79.1 diff --git a/package.json b/package.json index 5e7e3c5bd..162e481b2 100644 --- a/package.json +++ b/package.json @@ -215,7 +215,7 @@ "eslint-plugin-prettier": "2.6.0", "eslint-plugin-react": "7.8.2", "eslint-plugin-react-native": "^3.2.1", - "flow-bin": "^0.78.0", + "flow-bin": "^0.79.1", "jest": "23.4.1", "jest-junit": "5.1.0", "prettier": "1.13.6",