import { ServiceExtension } from './extensions/extension-interfaces' ; /**
 * A ServiceDescription is a wrapper for all of the extensions that a user wants
 * to add to an ECS Service. It collects all of the extensions that are added
 * to a service, allowing each extension to query the full list of extensions
 * added to a service to determine information about how to self-configure.
 */ export class ServiceDescription { /**
     * The list of extensions that have been registered to run when
     * preparing this service.
     */ public extensions : Record < string , ServiceExtension > = { } ; param extension public add ( extension ) { if ( this . extensions [ extension . name ] ) { throw new Error ( `An extension called ${ extension . name } has already been added` ) ; } this . extensions [ extension . name ] = extension ; return this ; } param name public get ( name ) { return this . extensions [ name ] ; } } ;