mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-02 09:35:40 -05:00
Dashboard Minor code cleanup (#894)
* minor code clean up for dashboard * formatting
This commit is contained in:
@@ -4,12 +4,19 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
|
||||
import { OnDestroy } from '@angular/core';
|
||||
import { Subscription } from 'rxjs/Subscription';
|
||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
|
||||
import { IDisposable, Disposable } from 'vs/base/common/lifecycle';
|
||||
|
||||
export function subscriptionToDisposable(sub: Subscription): IDisposable {
|
||||
return {
|
||||
dispose: sub.unsubscribe
|
||||
};
|
||||
}
|
||||
|
||||
export class AngularDisposable extends Disposable implements OnDestroy {
|
||||
ngOnDestroy() {
|
||||
this.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user