Skip to content

Instantly share code, notes, and snippets.

View ebrehault's full-sized avatar

Eric BREHAULT ebrehault

View GitHub Profile
@ebrehault
ebrehault / adapter.ts
Last active May 31, 2016 15:11 — forked from bloodbare/adapter.ts
TypeScript version of adaptation (ZTK)
let registry:any = {}
function implementing(typeInterface: any) {
return (target: any) => {
if (target.providesInterfaces === undefined) {
target.providesInterfaces = [typeInterface];
} else {
target.providesInterfaces.push(typeInterface);
}
return target;