Open KyleTryon opened 2 years ago
@KyleTryon Hello!
I want to clarify one moment. Do you mean we need to destructure all properties from the parameters
parameter and assign each of them to an own this
class property?
For example:
constructor(parameters: RunParameters) {
const {shell, command} = parameters;
this.shell = shell;
this.command = command;
// Other properties
}
Currently, the constructor for the
Run
native command takes in a singular argumentRunParameters
, which is an object containing all possible parameters of the Run command.While the singular argument for parameters in the constructor is preferred, we should expand the internal properties.
https://github.com/CircleCI-Public/circleci-config-sdk-ts/blob/main/src/lib/Components/Commands/exports/Native/Run.ts#L20
This should be expanded into this instead.