import { HandlerAdapter } from './HandlerAdapter' ; import { RequestHandler } from './RequestHandler' ; /**
 * Generic implementation of  HandlerAdapter }}
  export class GenericHandlerAdapter < Input , Output > implements HandlerAdapter < Input , Output > { public supports ( handler ) { return typeof handler . canHandle === 'function' && typeof handler . handle === 'function' ; } public async execute ( input , handler ) { return ( handler as RequestHandler < Input , Output > ) . handle ( input ) ; } }