8:00 – 5:00 SR
- Had to bounce the server
- Status reports! Done.
- Going to revisit the dynamic creation of callback functions to see if I can get it to work with Angular. If that fails I’m giving up and going back to interfaces. I expect Angular 2.0 to fix this problem anyway.
- This works:
export class ATSBase { constructor() { /****/ this["timeoutFunction"] = () => { var proto:Object = this["__proto__"]; proto["timeoutFunction"].apply(this, arguments); }; this["myFunction"] = () => { var proto:Object = this["__proto__"]; proto["myFunction"].apply(this, arguments); }; console.log("done"); /****/ } } - This does not:
class Base { constructor() { for (var p in this) if (!Object.prototype.hasOwnProperty.call(this, p) && typeof this[p] == 'function') { var method = this[p]; this[p] = () => { method.apply(this, arguments); }; // (make a prototype method bound to the instance) } } } - If I figure out that, I think I’ve got it…
