import { Disposable } from 'aurelia-framework';

export abstract class DisposableViewModelBase {

    constructor() {
        this.disposables = new Array<Disposable>();
    }

    public disposables: Array<Disposable>;

    public detached() {
        this.disposables?.forEach(x => x.dispose());
    }
}
