mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
20 lines
423 B
JavaScript
20 lines
423 B
JavaScript
|
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();
|
||
|
}
|
||
|
}
|