import { request, response } from "../interface"; import { router } from "../../index"; export interface platformAdapater { router: router; listen(port: number): void; handleRequest(nativeRequest: any): Promise>; handleResponse(response: response | Promise>, nativeResponse?: any): any; } export interface platformAdapaterConstructor { new (router: router): platformAdapater; } export function createPlatformAdapater( adapater: platformAdapaterConstructor, router: router ): platformAdapater { return new adapater(router); }