fbobjc -> Flow v0.28

Reviewed By: gabelevi

Differential Revision: D3518381

fbshipit-source-id: 2dd5f89177aaefbd098ba1fd3c193da111ff14c7
This commit is contained in:
Jeff Morrison 2016-07-06 08:56:10 -07:00 committed by Facebook Github Bot
parent dc2597ffee
commit a8e6a236cc
11 changed files with 37 additions and 18 deletions

View File

@ -9,6 +9,14 @@
# Ignore malformed json
.*/node_modules/y18n/test/.*\.json
# Ignore unexpected extra @providesModule
.*/node_modules/commoner/test/source/widget/share.js
# Ignore duplicate module providers
<PROJECT_ROOT>/Libraries/react-native/React.js
<PROJECT_ROOT>/Libraries/react-native/ReactNative.js
<PROJECT_ROOT>/node_modules/jest-runtime/build/__tests__/.*
[include]
[libs]
@ -32,9 +40,9 @@ suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FixMe
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(2[0-7]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(2[0-7]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(2[0-8]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(2[0-8]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
[version]
^0.27.0
^0.28.0

View File

@ -222,7 +222,7 @@ class ExampleScene extends Component {
const width = layout.initWidth;
const translateX = position.interpolate({
inputRange,
outputRange: [width, 0, -10],
outputRange: ([width, 0, -10]: Array<number>),
});
return {

View File

@ -1,4 +1,11 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* The examples provided by Facebook are for non-commercial testing and
* evaluation purposes only.
*
@ -81,7 +88,7 @@ function showValue(value) {
if (typeof ArrayBuffer !== 'undefined' &&
typeof Uint8Array !== 'undefined' &&
value instanceof ArrayBuffer) {
return `ArrayBuffer {${Array.from(new Uint8Array(value))}}`;
return `ArrayBuffer {${String(Array.from(new Uint8Array(value)))}}`;
}
return value;
}

View File

@ -101,6 +101,7 @@ function convertObject(object: Object, depth: number) {
if (!first) {
output += ', ';
}
// $FlowFixMe(>=0.28.0)
output += `${key}: ${convertValue(object[key], depth + 1)}`;
first = false;
}

View File

@ -143,6 +143,7 @@ class CameraRoll {
invariant(
type === 'photo' || type === 'video' || type === undefined,
// $FlowFixMe(>=0.28.0)
`The second argument to saveToCameraRoll must be 'photo' or 'video'. You passed ${type}`
);

View File

@ -90,18 +90,18 @@ function forHorizontal(props: NavigationSceneRendererProps): Object {
const opacity = position.interpolate({
inputRange,
outputRange: [1, 1, 0.3],
outputRange: ([1, 1, 0.3]: Array<number>),
});
const scale = position.interpolate({
inputRange,
outputRange: [1, 1, 0.95],
outputRange: ([1, 1, 0.95]: Array<number>),
});
const translateY = 0;
const translateX = position.interpolate({
inputRange,
outputRange: [width, 0, -10],
outputRange: ([width, 0, -10]: Array<number>),
});
return {
@ -131,18 +131,18 @@ function forVertical(props: NavigationSceneRendererProps): Object {
const opacity = position.interpolate({
inputRange,
outputRange: [1, 1, 0.3],
outputRange: ([1, 1, 0.3]: Array<number>),
});
const scale = position.interpolate({
inputRange,
outputRange: [1, 1, 0.95],
outputRange: ([1, 1, 0.95]: Array<number>),
});
const translateX = 0;
const translateY = position.interpolate({
inputRange,
outputRange: [height, 0, -10],
outputRange: ([height, 0, -10]: Array<number>),
});
return {

View File

@ -54,7 +54,7 @@ function forLeft(props: NavigationSceneRendererProps): Object {
return {
opacity: position.interpolate({
inputRange: [ index - 1, index, index + 1 ],
outputRange: [ 0, 1, 0 ],
outputRange: ([ 0, 1, 0 ]: Array<number>),
}),
};
}
@ -65,13 +65,13 @@ function forCenter(props: NavigationSceneRendererProps): Object {
return {
opacity:position.interpolate({
inputRange: [ index - 1, index, index + 1 ],
outputRange: [ 0, 1, 0 ],
outputRange: ([ 0, 1, 0 ]: Array<number>),
}),
transform: [
{
translateX: position.interpolate({
inputRange: [ index - 1, index + 1 ],
outputRange: [ 200, -200 ],
outputRange: ([ 200, -200 ]: Array<number>),
}),
}
],
@ -84,7 +84,7 @@ function forRight(props: NavigationSceneRendererProps): Object {
return {
opacity: position.interpolate({
inputRange: [ index - 1, index, index + 1 ],
outputRange: [ 0, 1, 0 ],
outputRange: ([ 0, 1, 0 ]: Array<number>),
}),
};
}

View File

@ -91,7 +91,7 @@ function forHorizontal(props: NavigationSceneRendererProps): Object {
const width = layout.initWidth;
const translateX = position.interpolate({
inputRange,
outputRange: [width, 0, -width],
outputRange: ([width, 0, -width]: Array<number>),
});
return {

View File

@ -626,6 +626,7 @@ class CellRenderer extends React.Component {
if (this.props.asyncRowPerfEventName) {
this._perfUpdateID = g_perf_update_id++;
this._asyncCookie = Systrace.beginAsyncEvent(this.props.asyncRowPerfEventName + this._perfUpdateID);
// $FlowFixMe(>=0.28.0)
infoLog(`perf_asynctest_${this.props.asyncRowPerfEventName}_start ${this._perfUpdateID} ${Date.now()}`);
}
if (this.props.includeInLayout) {
@ -662,6 +663,7 @@ class CellRenderer extends React.Component {
// Note this doesn't include the native render time but is more accurate than also including the JS render
// time of anything that has been queued up.
Systrace.endAsyncEvent(this.props.asyncRowPerfEventName + this._perfUpdateID, this._asyncCookie);
// $FlowFixMe(>=0.28.0)
infoLog(`perf_asynctest_${this.props.asyncRowPerfEventName}_end ${this._perfUpdateID} ${Date.now()}`);
}
}

View File

@ -12,4 +12,4 @@
'use strict';
type Atom = number | bool | Object | Array<?Atom>;
export type StyleObj = Atom | Array<?StyleObj>;
export type StyleObj = Atom;

View File

@ -196,7 +196,7 @@
"eslint-plugin-babel": "^3.2.0",
"eslint-plugin-flow-vars": "^0.2.1",
"eslint-plugin-react": "^4.2.1",
"flow-bin": "^0.27.0",
"flow-bin": "^0.28.0",
"jest": "^13.1.0",
"jest-repl": "^13.1.0",
"jest-runtime": "^13.1.0",