Help WantedSuggestion
Métricas do repositório
- Stars
- (48.455 stars)
- Métricas de merge de PR
- (Mesclagem média 6d 17h) (9 fundiu PRs em 30d)
Description
It would be useful when a module can implement an interface using the implements keyword. Syntax: module MyModule implements MyInterface { ... }.
Example:
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);