import { HttpSetup } from '../../../../../../../src/core/public' ; export class HttpService { private client : HttpSetup | undefined ; public setup ( httpClient ) { this . client = httpClient ; } public get httpClient ( ) : HttpSetup { if ( ! this . client ) { throw new Error ( 'Http service has not be initialized. Client is missing.' ) ; } return this . client ; } } export const httpService = new HttpService ( ) ;