提交 45723adb 编写于 作者: M Matt Bierner 提交者: Joao Moreno

Use memorize for channel

上级 05aaf618
......@@ -5,18 +5,16 @@
import { OutputChannel, window } from 'vscode';
import * as is from './is';
import { memoize } from './memoize';
import * as nls from 'vscode-nls';
const localize = nls.loadMessageBundle();
export default class Logger {
private _output?: OutputChannel;
@memoize
private get output(): OutputChannel {
if (!this._output) {
this._output = window.createOutputChannel(localize('channelName', 'TypeScript'));
}
return this._output;
return window.createOutputChannel(localize('channelName', 'TypeScript'));
}
private data2String(data: any): string {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册