import { Errors } from 'moleculer' ; export const Throw404 = < R extends { } > ( resource , message ) : R => { if ( ! resource ) { throw new Errors . MoleculerError ( message , 404 , 'Not Found' ) ; } return resource ; } ;