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
- struct's lifetime requirements can be bypassed via covariant field assignment
- Proposal to Reorganize the Moderation Team and Review Moderation Policies
- Progressive FPS degradation appears to be related to dota2.com — blocking the domain prevents the performance loss
- proposal: container/...: generic collection types
- Better Custom Endpoint BYOK
- A concrete policy for backward compatibility until Godot 5.0
Raise real-world problems, find people facing the same issue, and discuss solutions.9,000 issues0 comments
github (Other)
struct's lifetime requirements can be bypassed via covariant field assignment
Proposal to Reorganize the Moderation Team and Review Moderation Policies
Progressive FPS degradation appears to be related to dota2.com — blocking the domain prevents the performance loss
proposal: container/...: generic collection types
Better Custom Endpoint BYOK
A concrete policy for backward compatibility until Godot 5.0
New MTP models not supported
Tracking: 429 / Capacity Issues
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); ```
Comments (0)
No comments yet. Start the discussion.