mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
committed by
Paul O’Shannessy
parent
cbc450860e
commit
a71a787038
+5
-3
@@ -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
|
||||
|
||||
+1
-1
@@ -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",
|
||||
|
||||
@@ -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 &&
|
||||
@@ -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;
|
||||
@@ -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);
|
||||
@@ -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) {
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user