import { ITransportConstructor , ITransportMap , TransportType } from '../types' ; import { BufferedTransport } from './BufferedTransport' ; export * from './BufferedTransport' ; export * from './TTransport' ; export * from './ThriftFrameCodec' ; const transports = { buffered : BufferedTransport , } ; export const supportedTransports = Object . keys ( transports ) ; export function isTransportSupported ( transport ) { return supportedTransports . indexOf ( transport ) !== - 1 ; } export function getTransport ( transport = 'buffered' ) { if ( ! isTransportSupported ( transport ) ) { throw new Error ( `Invalid transport specified. Supported values: ${ supportedTransports . join ( ', ' ) }` ) ; } return transports [ transport ] ; }