Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@ munge_underscores=false
suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FixMe
suppress_type=$FlowExpectedError

suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(2[0-4]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(2[0-4]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*\\)?)\\)? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-1]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*www[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-1]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*www[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError

[version]
^0.27.0
^0.31.0
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"eslint-plugin-react-internal": "file:eslint-rules",
"fbjs": "^0.8.4",
"fbjs-scripts": "^0.6.0",
"flow-bin": "^0.27.0",
"flow-bin": "^0.31.0",
"glob": "^6.0.1",
"grunt": "^0.4.5",
"grunt-cli": "^0.1.13",
Expand Down
14 changes: 14 additions & 0 deletions src/renderers/shared/fiber/ReactChildFiber.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ function ChildReconciler(shouldClone) {

switch (newChildren.$$typeof) {
case REACT_ELEMENT_TYPE: {
/* $FlowFixMe(>=0.31.0): This is an unsafe cast. Consider adding a type
* annotation to the `newChildren` param of this
* function.
*/
const element = (newChildren : ReactElement<any>);
if (existingChild &&
element.type === existingChild.type &&
Expand All @@ -144,6 +148,8 @@ function ChildReconciler(shouldClone) {
}

case REACT_COROUTINE_TYPE: {
/* $FlowFixMe(>=0.31.0): No 'handler' property found in object type
*/
const coroutine = (newChildren : ReactCoroutine);
const child = createFiberFromCoroutine(coroutine, priority);
child.return = returnFiber;
Expand All @@ -154,6 +160,9 @@ function ChildReconciler(shouldClone) {
// A yield results in a fragment fiber whose output is the continuation.
// TODO: When there is only a single child, we can optimize this to avoid
// the fragment.
/* $FlowFixMe(>=0.31.0): No 'continuation' property found in object
* type
*/
const yieldNode = (newChildren : ReactYield);
const reifiedYield = createReifiedYield(yieldNode);
const child = createFiberFromYield(yieldNode, priority);
Expand All @@ -167,6 +176,11 @@ function ChildReconciler(shouldClone) {
var first : ?Fiber = null;
var prev : ?Fiber = null;
var existing : ?Fiber = existingChild;
/* $FlowIssue(>=0.31.0) #12747709
*
* `Array.isArray` is matched syntactically for now until predicate
* support is complete.
*/
for (var i = 0; i < newChildren.length; i++) {
var nextExisting = existing && existing.sibling;
if (prev == null) {
Expand Down
3 changes: 3 additions & 0 deletions src/renderers/shared/fiber/isomorphic/ReactCoroutine.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ export type ReactCoroutine = {
children: any,
// This should be a more specific CoroutineHandler
handler: (props: any, yields: Array<ReifiedYield>) => ReactNodeList,
/* $FlowFixMe(>=0.31.0): Which is it? mixed? Or Object? Must match
* `ReactYield` type.
*/
props: mixed,
};
export type ReactYield = {
Expand Down