namespace PluggableGreeter { function sayGoodMorning ( ) { console . log ( "Good morning!" ) ; } function sayGoodNight ( ) { console . log ( "Good night!" ) ; } class Greeter { greet : ( ) => void = sayGoodMorning ; } let greeter = new Greeter ( ) ; greeter . greet ( ) ; greeter . greet = sayGoodNight ; greeter . greet ( ) ; }