import type { Constructor } from '../types' ; import { NullLogger } from './null.logger' ; import type { LoggableInterface } from './loggable.interface' ; import type { LoggerInterface } from './logger.interface' ; export function LoggableMixin < TBase extends Constructor > ( Base ) { return class extends Base { private logger : LoggerInterface = new NullLogger ( ) ; setLogger ( logger ) { this . logger = logger ; return this ; } getLogger ( ) { return this . logger ; } } ; }