mirror of
https://github.com/zimplexing/OrionTV.git
synced 2026-02-04 11:44:44 +08:00
13 lines
519 B
TypeScript
13 lines
519 B
TypeScript
declare module 'react-native-http-bridge' {
|
|
import { EmitterSubscription } from 'react-native';
|
|
|
|
interface HttpBridge {
|
|
start(port: number, serviceName: string, callback: (request: { url: string; type: string; requestId: string; postData: string }) => void): void;
|
|
stop(): void;
|
|
on(event: 'request', callback: (request: any) => void): EmitterSubscription;
|
|
respond(requestId: string, code: number, type: string, body: string): void;
|
|
}
|
|
|
|
const httpBridge: HttpBridge;
|
|
export default httpBridge;
|
|
} |