Small flow fixes
Ben Alpert committed
Sep 1, 2016 at 15:52 UTC
0722b157525ab9ca3f30bf69fbfbe04fe641ec9e
2 files changed
+7
-7
src/renderers/shared/ReactPerf.js
+4
-4
@@ -305,7 +305,7 @@ function getOperations(flushHistory = getLastMeasurements()) {
305
return stats;
306
}
307
308
-function printExclusive(flushHistory: FlushHistory) {
308
+function printExclusive(flushHistory?: FlushHistory) {
309
if (!__DEV__) {
310
warnInProduction();
311
return;
@@ -331,7 +331,7 @@ function printExclusive(flushHistory: FlushHistory) {
331
consoleTable(table);
332
}
333
334
-function printInclusive(flushHistory: FlushHistory) {
334
+function printInclusive(flushHistory?: FlushHistory) {
335
if (!__DEV__) {
336
warnInProduction();
337
return;
@@ -350,7 +350,7 @@ function printInclusive(flushHistory: FlushHistory) {
350
consoleTable(table);
351
}
352
353
-function printWasted(flushHistory: FlushHistory) {
353
+function printWasted(flushHistory?: FlushHistory) {
354
if (!__DEV__) {
355
warnInProduction();
356
return;
@@ -369,7 +369,7 @@ function printWasted(flushHistory: FlushHistory) {
369
consoleTable(table);
370
}
371
372
-function printOperations(flushHistory: FlushHistory) {
372
+function printOperations(flushHistory?: FlushHistory) {
373
if (!__DEV__) {
374
warnInProduction();
375
return;
src/shared/types/ReactPropTypeLocationNames.js
+3
-3
@@ -16,14 +16,14 @@ import type { ReactPropTypeLocations } from 'ReactPropTypeLocations';
16
17
type NamesType = {[key: ReactPropTypeLocations]: string};
18
19
-var ReactPropTypeLocationNames = {};
19
+var ReactPropTypeLocationNames: NamesType = {};
20
21
if (__DEV__) {
22
- ReactPropTypeLocationNames = ({
22
+ ReactPropTypeLocationNames = {
23
prop: 'prop',
24
context: 'context',
25
childContext: 'child context',
26
- }: NamesType);
26
+ };
27
}
28
29
module.exports = ReactPropTypeLocationNames;