import { Descriptor } from './descriptors' ; import { ServiceIdentifier , BrandedService } from './instantiation' ; const _registry = [ ] ; export function registerSingleton < T , Services extends BrandedService [ ] > ( id , ctor , supportsDelayedInstantiation ? ) { _registry . push ( [ id , new Descriptor < T > ( ctor as new ( ... args ) => T , [ ] , supportsDelayedInstantiation ) ] ) ; } export function getSingletonServiceDescriptors ( ) { return _registry ; }