* Copy settings that are useful to have in common across root command and subcommands. * * (Used internally when adding a command using `.command()` so subcommands inherit parent settings.) * * @param {Command} sourceCommand * @return {Command} `this` command for chaining
(sourceCommand)
| 98 | * @return {Command} `this` command for chaining |
| 99 | */ |
| 100 | copyInheritedSettings(sourceCommand) { |
| 101 | this._outputConfiguration = sourceCommand._outputConfiguration; |
| 102 | this._helpOption = sourceCommand._helpOption; |
| 103 | this._helpCommand = sourceCommand._helpCommand; |
| 104 | this._helpConfiguration = sourceCommand._helpConfiguration; |
| 105 | this._exitCallback = sourceCommand._exitCallback; |
| 106 | this._storeOptionsAsProperties = sourceCommand._storeOptionsAsProperties; |
| 107 | this._combineFlagAndOptionalValue = |
| 108 | sourceCommand._combineFlagAndOptionalValue; |
| 109 | this._allowExcessArguments = sourceCommand._allowExcessArguments; |
| 110 | this._enablePositionalOptions = sourceCommand._enablePositionalOptions; |
| 111 | this._showHelpAfterError = sourceCommand._showHelpAfterError; |
| 112 | this._showSuggestionAfterError = sourceCommand._showSuggestionAfterError; |
| 113 | |
| 114 | return this; |
| 115 | } |
| 116 | |
| 117 | /** |
| 118 | * @returns {Command[]} |
no outgoing calls