Fix type errors for flipper-server and flipper-ui-browser

Summary:
Before:

```
flipper-server/src/startBaseServer.tsx(222,30): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
  Type 'undefined' is not assignable to type 'string'.
flipper-ui-browser/src/flipperServerConnection.tsx(25,9): error TS2322: Type 'Timeout' is not assignable to type 'number'.
```

Reviewed By: nikoant

Differential Revision: D36100188

fbshipit-source-id: 1913a43109a0e068394a188d362f6a9e473e7904
This commit is contained in:
Pascal Hartig
2022-05-03 09:55:04 -07:00
committed by Facebook GitHub Bot
parent 350bd01a19
commit 3032736294
2 changed files with 2 additions and 2 deletions

View File

@@ -22,7 +22,7 @@ export function createFlipperServer(): Promise<FlipperServer> {
// TODO: polish this all!
window.flipperShowError?.('Connecting to server...');
return new Promise<FlipperServer>((resolve, reject) => {
let initialConnectionTimeout: number | undefined = setTimeout(() => {
let initialConnectionTimeout: number | undefined = window.setTimeout(() => {
reject(
new Error('Failed to connect to Flipper server in a timely manner'),
);