This is weird. What am I doing wrong?
class Store extends Riot.Observable {
trigger():void {
// shouldn't this be completely overwriting the trigger method on riot.observable?
console.log("my trigger....");
}
}
let store = new Store();
store.trigger();
Expected behaviour: "my trigger...." in the console. What I get is the original implementation of trigger on the Riot.Observable, which errors because of no parameters being passed.
If I poke the store
object I can see on store.__proto__
does have trigger on there, with my implementation. But store
iself has its own (original) copy of trigger()
Please see https://jsfiddle.net/sidouglas/5spbvpnn/
I referenced this with a very basic example, and I don't know what's going on.