vector-im-hydrogen-web/src/domain/ViewModel.js

20 lines
423 B
JavaScript
Raw Normal View History

2020-04-09 23:19:49 +02:00
export class ViewModel extends ObservableValue {
constructor(options) {
super();
this.disposables = new Disposables();
this._options = options;
}
childOptions(explicitOptions) {
return Object.assign({}, this._options, explicitOptions);
}
track(disposable) {
this.disposables.track(disposable);
}
dispose() {
this.disposables.dispose();
}
}