andreypopp/autobind-decorator

If bound methods or fields are re-assigned, they become shared between instances

Open

#76 opened on 2018年11月16日

GitHub で見る
 (8 comments) (0 reactions) (0 assignees)JavaScript (1,446 stars) (76 forks)batch import
PR welcomebughelp wanted

説明

If bound methods or fields are re-assigned, they become shared between instances

Found this issue while trying to debounce bound method

Below test will fail

class A {
  @boundMethod
  bound() {}
}

const a = new A();
const b = new A();
a.bound = {
  foo: 'bar'
};
assert.notEqual(a.bound, b.bound);

コントリビューターガイド