Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Commit

Permalink
Add cli-server-api type declaration
Browse files Browse the repository at this point in the history
cli-server-api 4.8.0 doesn't include TS declarations
  • Loading branch information
fson committed Apr 27, 2020
1 parent b2963c3 commit 53f8460
Showing 1 changed file with 33 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/// <reference types="node" />
/// <reference types="ws" />
declare module '@react-native-community/cli-server-api' {
import http from 'http';
import { Server as HttpsServer } from 'https';

type MiddlewareOptions = {
host?: string;
watchFolders: ReadonlyArray<string>;
port: number;
};

export function createDevServerMiddleware(
options: MiddlewareOptions
): {
attachToServer(
server: http.Server | HttpsServer
): {
debuggerProxy: {
server: import('ws').Server;
isDebuggerConnected(): boolean;
};
eventsSocket: {
reportEvent: (event: any) => void;
};
messageSocket: {
broadcast: (method: string, params?: Record<string, any> | undefined) => void;
};
};
middleware: any;
};
//# sourceMappingURL=index.d.ts.map
}

0 comments on commit 53f8460

Please sign in to comment.