mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-05 07:17:04 +00:00
tests for addObserver and removeObserver with optional 3rd parameter
This commit is contained in:
@@ -14,6 +14,11 @@ class MyComponent extends Ember.Component {
|
||||
this.removeObserver('foo', this, this.fooDidChange);
|
||||
Ember.removeObserver(this, 'foo', this, 'fooDidChange');
|
||||
Ember.removeObserver(this, 'foo', this, this.fooDidChange);
|
||||
const lambda = () => {
|
||||
this.fooDidChange(this, 'foo');
|
||||
};
|
||||
this.addObserver('foo', lambda);
|
||||
this.removeObserver('foo', lambda);
|
||||
}
|
||||
|
||||
fooDidChange(sender: MyComponent, key: 'foo') {
|
||||
|
||||
Reference in New Issue
Block a user