diff --git a/Libraries/Core/Timers/JSTimersExecution.js b/Libraries/Core/Timers/JSTimersExecution.js index e5e386d4f..ee2275c33 100644 --- a/Libraries/Core/Timers/JSTimersExecution.js +++ b/Libraries/Core/Timers/JSTimersExecution.js @@ -47,7 +47,7 @@ const JSTimersExecution = { requestIdleCallbacks: [], identifiers: ([] : Array), - errors: (null : ?[Error]), + errors: (null : ?Array), /** * Calls the callback associated with the ID. Also unregister that callback @@ -112,9 +112,6 @@ const JSTimersExecution = { if (!JSTimersExecution.errors) { JSTimersExecution.errors = [e]; } else { - /* $FlowFixMe(>=0.38.0 site=react_native_fb,react_native_oss) - Flow - * error detected during the deployment of v0.38.0. To see the error, - * remove this comment and run flow */ JSTimersExecution.errors.push(e); } } diff --git a/Libraries/NavigationExperimental/NavigationTransitioner.js b/Libraries/NavigationExperimental/NavigationTransitioner.js index d174f98e1..7edf96faf 100644 --- a/Libraries/NavigationExperimental/NavigationTransitioner.js +++ b/Libraries/NavigationExperimental/NavigationTransitioner.js @@ -19,6 +19,8 @@ const React = require('React'); const StyleSheet = require('StyleSheet'); const View = require('View'); +const invariant = require('fbjs/lib/invariant'); + import type { NavigationAnimatedValue, NavigationLayout, @@ -259,17 +261,17 @@ function buildTransitionProps( scenes, } = state; - /* $FlowFixMe(>=0.38.0 site=react_native_fb,react_native_oss) - Flow error - * detected during the deployment of v0.38.0. To see the error, remove this - * comment and run flow - */ + const scene = scenes.find(isSceneActive); + + invariant(scene, 'No active scene when building navigation transition props.'); + return { layout, navigationState, position, progress, scenes, - scene: scenes.find(isSceneActive), + scene }; } diff --git a/Libraries/Network/XMLHttpRequest.js b/Libraries/Network/XMLHttpRequest.js index 30dce01b5..bf6d30191 100644 --- a/Libraries/Network/XMLHttpRequest.js +++ b/Libraries/Network/XMLHttpRequest.js @@ -121,7 +121,7 @@ class XMLHttpRequest extends EventTarget(...XHR_EVENTS) { upload: XMLHttpRequestEventTarget = new XMLHttpRequestEventTarget(); _requestId: ?number; - _subscriptions: [any]; + _subscriptions: Array<*>; _aborted: boolean = false; _cachedResponse: Response; @@ -393,9 +393,6 @@ class XMLHttpRequest extends EventTarget(...XHR_EVENTS) { (this._subscriptions || []).forEach(sub => { sub.remove(); }); - /* $FlowFixMe(>=0.38.0 site=react_native_fb,react_native_oss) - Flow error - * detected during the deployment of v0.38.0. To see the error, remove this - * comment and run flow */ this._subscriptions = []; } @@ -460,44 +457,26 @@ class XMLHttpRequest extends EventTarget(...XHR_EVENTS) { !!this.onreadystatechange || !!this.onprogress; - /* $FlowFixMe(>=0.38.0 site=react_native_fb,react_native_oss) - Flow error - * detected during the deployment of v0.38.0. To see the error, remove this - * comment and run flow */ this._subscriptions.push(RCTNetworking.addListener( 'didSendNetworkData', (args) => this.__didUploadProgress(...args) )); - /* $FlowFixMe(>=0.38.0 site=react_native_fb,react_native_oss) - Flow error - * detected during the deployment of v0.38.0. To see the error, remove this - * comment and run flow */ this._subscriptions.push(RCTNetworking.addListener( 'didReceiveNetworkResponse', (args) => this.__didReceiveResponse(...args) )); - /* $FlowFixMe(>=0.38.0 site=react_native_fb,react_native_oss) - Flow error - * detected during the deployment of v0.38.0. To see the error, remove this - * comment and run flow */ this._subscriptions.push(RCTNetworking.addListener( 'didReceiveNetworkData', (args) => this.__didReceiveData(...args) )); - /* $FlowFixMe(>=0.38.0 site=react_native_fb,react_native_oss) - Flow error - * detected during the deployment of v0.38.0. To see the error, remove this - * comment and run flow */ this._subscriptions.push(RCTNetworking.addListener( 'didReceiveNetworkIncrementalData', (args) => this.__didReceiveIncrementalData(...args) )); - /* $FlowFixMe(>=0.38.0 site=react_native_fb,react_native_oss) - Flow error - * detected during the deployment of v0.38.0. To see the error, remove this - * comment and run flow */ this._subscriptions.push(RCTNetworking.addListener( 'didReceiveNetworkDataProgress', (args) => this.__didReceiveDataProgress(...args) )); - /* $FlowFixMe(>=0.38.0 site=react_native_fb,react_native_oss) - Flow error - * detected during the deployment of v0.38.0. To see the error, remove this - * comment and run flow */ this._subscriptions.push(RCTNetworking.addListener( 'didCompleteNetworkResponse', (args) => this.__didCompleteResponse(...args) diff --git a/Libraries/ReactNative/requireNativeComponent.js b/Libraries/ReactNative/requireNativeComponent.js index 21bf0ae2d..c404e60bf 100644 --- a/Libraries/ReactNative/requireNativeComponent.js +++ b/Libraries/ReactNative/requireNativeComponent.js @@ -111,11 +111,7 @@ const TypeToDifferMap = { // (not yet implemented) }; -function processColorArray(colors: []): [] { - /* $FlowFixMe(>=0.38.0 site=react_native_fb,react_native_oss) - Flow error - * detected during the deployment of v0.38.0. To see the error, remove this - * comment and run flow - */ +function processColorArray(colors: ?Array): ?Array { return colors && colors.map(processColor); } diff --git a/Libraries/Renderer/src/renderers/shared/fiber/ReactChildFiber.js b/Libraries/Renderer/src/renderers/shared/fiber/ReactChildFiber.js index e981a69fb..93839caed 100644 --- a/Libraries/Renderer/src/renderers/shared/fiber/ReactChildFiber.js +++ b/Libraries/Renderer/src/renderers/shared/fiber/ReactChildFiber.js @@ -73,7 +73,6 @@ function ChildReconciler(shouldClone) { return clone; } const child = createFiberFromElement(element, priority); - // $FlowFixMe(>=0.34.0) previousSibling.sibling = child; child.return = returnFiber; return child; diff --git a/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js b/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js index 700edd3a4..9d217797a 100644 --- a/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js +++ b/Libraries/Renderer/src/renderers/shared/fiber/ReactFiber.js @@ -57,9 +57,6 @@ type Instance = { // A Fiber is work on a Component that needs to be done or was done. There can // be more than one per component. -/* $FlowFixMe(>=0.38.0 site=react_native_fb,react_native_oss) - Flow error - * detected during the deployment of v0.38.0. To see the error, remove this - * comment and run flow */ export type Fiber = Instance & { // The Fiber to return to after finishing processing this one. @@ -249,7 +246,7 @@ exports.createFiberFromElement = function(element : ReactElement<*>, priorityLev }; // $FlowFixMe(>=0.34.0) -function createFiberFromElementType(type : mixed, key : null | string) { +function createFiberFromElementType(type : Function | string | Fiber, key : null | string) { let fiber; if (typeof type === 'function') { fiber = shouldConstruct(type) ? diff --git a/Libraries/Renderer/src/renderers/shared/fiber/ReactReifiedYield.js b/Libraries/Renderer/src/renderers/shared/fiber/ReactReifiedYield.js index 06403b8ad..557fb0b50 100644 --- a/Libraries/Renderer/src/renderers/shared/fiber/ReactReifiedYield.js +++ b/Libraries/Renderer/src/renderers/shared/fiber/ReactReifiedYield.js @@ -20,16 +20,11 @@ var { createFiberFromElementType } = require('ReactFiber'); export type ReifiedYield = { continuation: Fiber, props: Object }; exports.createReifiedYield = function(yieldNode : ReactYield) : ReifiedYield { - var fiber = createFiberFromElementType( - yieldNode.continuation, - yieldNode.key - ); - /* $FlowFixMe(>=0.38.0 site=react_native_fb,react_native_oss) - Flow error - * detected during the deployment of v0.38.0. To see the error, remove this - * comment and run flow - */ return { - continuation: fiber, + continuation: createFiberFromElementType( + yieldNode.continuation, + yieldNode.key + ), props: yieldNode.props, }; }; diff --git a/local-cli/server/middleware/heapCapture/src/AggrowTable.jsx b/local-cli/server/middleware/heapCapture/src/AggrowTable.jsx index 66fcac3e8..8a54b2ba2 100644 --- a/local-cli/server/middleware/heapCapture/src/AggrowTable.jsx +++ b/local-cli/server/middleware/heapCapture/src/AggrowTable.jsx @@ -47,10 +47,7 @@ export default class AggrowTable extends React.Component { state: State; componentDidMount() { - /* $FlowFixMe(>=0.38.0 site=react_native_fb,react_native_oss) - Flow error - * detected during the deployment of v0.38.0. To see the error, remove this - * comment and run flow */ - document.body.addEventListener('keydown', this.keydown); + document.body && document.body.addEventListener('keydown', this.keydown); } componentWillReceiveProps(nextProps: Props) { @@ -64,10 +61,7 @@ export default class AggrowTable extends React.Component { } componentWillUnmount() { - /* $FlowFixMe(>=0.38.0 site=react_native_fb,react_native_oss) - Flow error - * detected during the deployment of v0.38.0. To see the error, remove this - * comment and run flow */ - document.body.removeEventListener('keydown', this.keydown); + document.body && document.body.removeEventListener('keydown', this.keydown); } scroll = (e: SyntheticUIEvent) => {