"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.registerCommand = registerCommand;
function registerCommand(parent, child) {
    child.copyInheritedSettings(parent);
    syncInheritedSettingsToDescendants(child);
    parent.addCommand(child);
}
function syncInheritedSettingsToDescendants(command) {
    for (const nested of command.commands ?? []) {
        nested.copyInheritedSettings(command);
        syncInheritedSettingsToDescendants(nested);
    }
}
