Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0c62d12

Browse files
authored
Merge pull request react#7634 from spicyj/flowfix
Small flow fixes
2 parents 34761cf + 0722b15 commit 0c62d12

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

src/renderers/shared/ReactPerf.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ function getOperations(flushHistory = getLastMeasurements()) {
305305
return stats;
306306
}
307307

308-
function printExclusive(flushHistory: FlushHistory) {
308+
function printExclusive(flushHistory?: FlushHistory) {
309309
if (!__DEV__) {
310310
warnInProduction();
311311
return;
@@ -331,7 +331,7 @@ function printExclusive(flushHistory: FlushHistory) {
331331
consoleTable(table);
332332
}
333333

334-
function printInclusive(flushHistory: FlushHistory) {
334+
function printInclusive(flushHistory?: FlushHistory) {
335335
if (!__DEV__) {
336336
warnInProduction();
337337
return;
@@ -350,7 +350,7 @@ function printInclusive(flushHistory: FlushHistory) {
350350
consoleTable(table);
351351
}
352352

353-
function printWasted(flushHistory: FlushHistory) {
353+
function printWasted(flushHistory?: FlushHistory) {
354354
if (!__DEV__) {
355355
warnInProduction();
356356
return;
@@ -369,7 +369,7 @@ function printWasted(flushHistory: FlushHistory) {
369369
consoleTable(table);
370370
}
371371

372-
function printOperations(flushHistory: FlushHistory) {
372+
function printOperations(flushHistory?: FlushHistory) {
373373
if (!__DEV__) {
374374
warnInProduction();
375375
return;

src/shared/types/ReactPropTypeLocationNames.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ import type { ReactPropTypeLocations } from 'ReactPropTypeLocations';
1616

1717
type NamesType = {[key: ReactPropTypeLocations]: string};
1818

19-
var ReactPropTypeLocationNames = {};
19+
var ReactPropTypeLocationNames: NamesType = {};
2020

2121
if (__DEV__) {
22-
ReactPropTypeLocationNames = ({
22+
ReactPropTypeLocationNames = {
2323
prop: 'prop',
2424
context: 'context',
2525
childContext: 'child context',
26-
}: NamesType);
26+
};
2727
}
2828

2929
module.exports = ReactPropTypeLocationNames;

0 commit comments

Comments
 (0)