提交 025c005f 编写于 作者: M Matt Bierner

Remove extra indirection in toDisposable

上级 a1c5ded6
......@@ -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 {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册