From 9e423e4befd89762409fd0bf07f32fe941442a53 Mon Sep 17 00:00:00 2001 From: Pascal Hartig Date: Fri, 9 Aug 2019 10:32:36 -0700 Subject: [PATCH] Migrate environmentVariables Summary: _typescript_ Reviewed By: jknoxville Differential Revision: D16709690 fbshipit-source-id: efa0431ab1ab0e2fc81ae4a9155d2f0a3ab9e4c5 --- src/utils/__tests__/environmentVariables.node.js | 2 +- src/utils/{environmentVariables.js => environmentVariables.tsx} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename src/utils/{environmentVariables.js => environmentVariables.tsx} (91%) diff --git a/src/utils/__tests__/environmentVariables.node.js b/src/utils/__tests__/environmentVariables.node.js index a1072301d..f91ffd81e 100644 --- a/src/utils/__tests__/environmentVariables.node.js +++ b/src/utils/__tests__/environmentVariables.node.js @@ -5,7 +5,7 @@ * @format */ -import {parseFlipperPorts} from '../environmentVariables'; +import {parseFlipperPorts} from '../environmentVariables.tsx'; test('Valid port overrides are parsed correctly', () => { const overrides = parseFlipperPorts('1111,2222'); diff --git a/src/utils/environmentVariables.js b/src/utils/environmentVariables.tsx similarity index 91% rename from src/utils/environmentVariables.js rename to src/utils/environmentVariables.tsx index 1a7267b78..7cbdf779e 100644 --- a/src/utils/environmentVariables.js +++ b/src/utils/environmentVariables.tsx @@ -7,7 +7,7 @@ export function parseFlipperPorts( envVar: string, -): ?{insecure: number, secure: number} { +): {insecure: number; secure: number} | undefined { const components = envVar.split(','); const ports = components.map(x => parseInt(x, 10));