IssueRaiser

Allow a module to implement an interface

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

Posted by ivogabe on Aug 10, 2014, 10:46 AM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.9,000 issues0 comments

github (Other)

Allow a module to implement an interface

ivogabeAug 10, 2014, 10:46 AM

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

Comments (0)

No comments yet. Start the discussion.

Comment on this issue