提交 010f2bee 编写于 作者: M Matt Bierner

Don't use Set ctor

上级 92e20dfe
......@@ -95,18 +95,18 @@ export class CodeActionWidget extends Disposable {
}
private resolveKeybindings(actions: readonly CodeActionAction[]): Map<CodeActionAction, ResolvedKeybinding> {
const codeActionCommands = new Set([
const codeActionCommands: readonly string[] = [
refactorCommandId,
codeActionCommandId,
sourceActionCommandId,
organizeImportsCommandId,
fixAllCommandId
]);
];
// Lazy since we may not actually ever read the value
const allCodeActionBindings = new Lazy<readonly ResolveCodeActionKeybinding[]>(() =>
this._keybindingService.getKeybindings()
.filter(item => codeActionCommands.has(item.command!))
.filter(item => codeActionCommands.indexOf(item.command!) >= 0)
.filter(item => item.resolvedKeybinding)
.map((item): ResolveCodeActionKeybinding => {
// Special case these commands since they come built-in with VS Code and don't use 'commandArgs'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册