Merge from vscode fc10e26ea50f82cdd84e9141491357922e6f5fba (#4639)

This commit is contained in:
Anthony Dresser
2019-03-21 10:58:16 -07:00
committed by GitHub
parent 8298db7d13
commit b65ee5b42e
149 changed files with 1408 additions and 814 deletions

View File

@@ -577,7 +577,7 @@ export class WorkbenchKeybindingService extends AbstractKeybindingService {
let schemaId = 'vscode://schemas/keybindings';
let commandsSchemas: IJSONSchema[] = [];
let commandsEnum: string[] = [];
let commandsEnumDescriptions: (string | null | undefined)[] = [];
let commandsEnumDescriptions: (string | undefined)[] = [];
let schema: IJSONSchema = {
'id': schemaId,
'type': 'array',
@@ -636,7 +636,7 @@ function updateSchema() {
commandsEnumDescriptions.length = 0;
const knownCommands = new Set<string>();
const addKnownCommand = (commandId: string, description?: string | null) => {
const addKnownCommand = (commandId: string, description?: string | undefined) => {
if (!/^_/.test(commandId)) {
if (!knownCommands.has(commandId)) {
knownCommands.add(commandId);
@@ -655,7 +655,7 @@ function updateSchema() {
for (let commandId in allCommands) {
const commandDescription = allCommands[commandId].description;
addKnownCommand(commandId, commandDescription && commandDescription.description);
addKnownCommand(commandId, commandDescription ? commandDescription.description : undefined);
if (!commandDescription || !commandDescription.args || commandDescription.args.length !== 1 || !commandDescription.args[0].schema) {
continue;
@@ -684,7 +684,6 @@ function updateSchema() {
for (let commandId in menuCommands) {
addKnownCommand(commandId);
}
}
const configurationRegistry = Registry.as<IConfigurationRegistry>(ConfigExtensions.Configuration);