export const valueToResponseType = < T > ( value ) : Promise < Response > => new Promise < Response > ( ( resolve ) => resolve ( { ok : true , json : ( ) => new Promise ( ( r ) => r ( value ) ) , } as Response ) ) ; export const valueToResponse = ( value ) : Promise < Response > => valueToResponseType ( value ) ;