Skip to content

Fix setKeyValue for class fields

Compare
Choose a tag to compare
@cherifGsoul cherifGsoul released this 22 Jun 17:15
· 5 commits to master since this release

This fixes the usage of canReflect.setKeyValue after class fields chages.

class MyType extends ObservableObject {
}

const myType = new MyType();

canReflect.onKeyValue(myType, 'foo', (newVal) => {
    console.log(newVal); // -> 4 will be logged once
});

canReflect.setKeyValue(myType, 'foo', 4);

#36