Rush StackShopBlogEvents
Skip to main content

Home > @rushstack/ts-command-line > ScopedCommandLineAction > onDefineScopedParameters

ScopedCommandLineAction.onDefineScopedParameters() method

The child class should implement this hook to define its scoped command-line parameters, e.g. by calling scopedParameterProvider.defineFlagParameter(). These parameters will only be available if the action is invoked with a scope.

Signature:

protected abstract onDefineScopedParameters(scopedParameterProvider: CommandLineParameterProvider): void;

Parameters

ParameterTypeDescription
scopedParameterProviderCommandLineParameterProvider

Returns:

void

Remarks

onDefineScopedParameters is called after the unscoped parameters have been parsed. The values they provide can be used to vary the defined scope parameters.