mirror of
https://github.com/microsoft/vscode.git
synced 2026-06-06 15:45:54 +01:00
Remove extra indirection in toDisposable
This commit is contained in:
@@ -34,7 +34,7 @@ export function combinedDisposable(...disposables: IDisposable[]): IDisposable {
|
||||
}
|
||||
|
||||
export function toDisposable(fn: () => void): IDisposable {
|
||||
return { dispose() { fn(); } };
|
||||
return { dispose: fn };
|
||||
}
|
||||
|
||||
export class DisposableStore implements IDisposable {
|
||||
|
||||
Reference in New Issue
Block a user