Make processConfig pass strict mode
Summary: _typescript_ Reviewed By: danielbuechele Differential Revision: D17072572 fbshipit-source-id: fed0d93e7a4cfe04f339370dbace7181bec73ca1
This commit is contained in:
committed by
Facebook Github Bot
parent
f548844df5
commit
5cac2edc37
@@ -23,11 +23,10 @@ export type ProcessConfig = {
|
|||||||
launcherEnabled: boolean;
|
launcherEnabled: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
let configObj = null;
|
let configObj: ProcessConfig | null = null;
|
||||||
export default function config(): ProcessConfig {
|
export default function config(): ProcessConfig {
|
||||||
if (configObj === null) {
|
if (configObj === null) {
|
||||||
const json = JSON.parse(
|
const json = JSON.parse(
|
||||||
// $FlowFixMe: process.env not in type defs
|
|
||||||
(remote && remote.process.env.CONFIG) || process.env.CONFIG || '{}',
|
(remote && remote.process.env.CONFIG) || process.env.CONFIG || '{}',
|
||||||
);
|
);
|
||||||
configObj = {
|
configObj = {
|
||||||
|
|||||||
Reference in New Issue
Block a user