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:
committed by
Facebook GitHub Bot
parent
350bd01a19
commit
3032736294
@@ -219,7 +219,7 @@ function addWebsocket(server: http.Server, config: Config) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
server.on('upgrade', function upgrade(request, socket, head) {
|
server.on('upgrade', function upgrade(request, socket, head) {
|
||||||
const {pathname} = parse(request.url);
|
const {pathname} = parse(request.url!);
|
||||||
|
|
||||||
// Handled by Metro
|
// Handled by Metro
|
||||||
if (pathname === '/hot') {
|
if (pathname === '/hot') {
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ export function createFlipperServer(): Promise<FlipperServer> {
|
|||||||
// TODO: polish this all!
|
// TODO: polish this all!
|
||||||
window.flipperShowError?.('Connecting to server...');
|
window.flipperShowError?.('Connecting to server...');
|
||||||
return new Promise<FlipperServer>((resolve, reject) => {
|
return new Promise<FlipperServer>((resolve, reject) => {
|
||||||
let initialConnectionTimeout: number | undefined = setTimeout(() => {
|
let initialConnectionTimeout: number | undefined = window.setTimeout(() => {
|
||||||
reject(
|
reject(
|
||||||
new Error('Failed to connect to Flipper server in a timely manner'),
|
new Error('Failed to connect to Flipper server in a timely manner'),
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user