diff --git a/src/renderers/shared/ReactPerf.js b/src/renderers/shared/ReactPerf.js index 95b92f1ac6..0f3886f69f 100644 --- a/src/renderers/shared/ReactPerf.js +++ b/src/renderers/shared/ReactPerf.js @@ -305,7 +305,7 @@ function getOperations(flushHistory = getLastMeasurements()) { return stats; } -function printExclusive(flushHistory: FlushHistory) { +function printExclusive(flushHistory?: FlushHistory) { if (!__DEV__) { warnInProduction(); return; @@ -331,7 +331,7 @@ function printExclusive(flushHistory: FlushHistory) { consoleTable(table); } -function printInclusive(flushHistory: FlushHistory) { +function printInclusive(flushHistory?: FlushHistory) { if (!__DEV__) { warnInProduction(); return; @@ -350,7 +350,7 @@ function printInclusive(flushHistory: FlushHistory) { consoleTable(table); } -function printWasted(flushHistory: FlushHistory) { +function printWasted(flushHistory?: FlushHistory) { if (!__DEV__) { warnInProduction(); return; @@ -369,7 +369,7 @@ function printWasted(flushHistory: FlushHistory) { consoleTable(table); } -function printOperations(flushHistory: FlushHistory) { +function printOperations(flushHistory?: FlushHistory) { if (!__DEV__) { warnInProduction(); return; diff --git a/src/shared/types/ReactPropTypeLocationNames.js b/src/shared/types/ReactPropTypeLocationNames.js index 85e9851dca..1b36b04cc8 100644 --- a/src/shared/types/ReactPropTypeLocationNames.js +++ b/src/shared/types/ReactPropTypeLocationNames.js @@ -16,14 +16,14 @@ import type { ReactPropTypeLocations } from 'ReactPropTypeLocations'; type NamesType = {[key: ReactPropTypeLocations]: string}; -var ReactPropTypeLocationNames = {}; +var ReactPropTypeLocationNames: NamesType = {}; if (__DEV__) { - ReactPropTypeLocationNames = ({ + ReactPropTypeLocationNames = { prop: 'prop', context: 'context', childContext: 'child context', - }: NamesType); + }; } module.exports = ReactPropTypeLocationNames;