It would be useful when a module can implement an interface using the implements keyword. Syntax: module MyModule implements MyInterface { ... }.
Example:
interfaceShowable{show(): void;}functionaddShowable(showable: Showable){}// This works:
module Login{exportfunctionshow(){document.getElementById('login').style.display='block';}}addShowable(Login);// This doesn't work (yet?)
module MenuimplementsShowable{exportfunctionshow(){document.getElementById('menu').style.display='block';}}addShowable(Menu);
It would be useful when a module can implement an interface using the
implementskeyword. Syntax:module MyModule implements MyInterface { ... }.Example: