提交 de4fd854 编写于 作者: B Benjamin Pasero

use anonymous class

上级 e4dd8b64
......@@ -414,7 +414,7 @@ class Cache {
public scorerCache: ScorerCache = Object.create(null);
}
class FileMatchItemAccessorClass implements IItemAccessor<IRawFileMatch> {
const FileMatchItemAccessor = new class implements IItemAccessor<IRawFileMatch> {
public getItemLabel(match: IRawFileMatch): string {
return match.basename; // e.g. myFile.txt
......@@ -427,9 +427,7 @@ class FileMatchItemAccessorClass implements IItemAccessor<IRawFileMatch> {
public getItemPath(match: IRawFileMatch): string {
return match.relativePath; // e.g. some/path/to/file/myFile.txt
}
}
const FileMatchItemAccessor = new FileMatchItemAccessorClass();
};
interface CacheStats {
cacheWasResolved: boolean;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册