diff --git a/4mat/4mat.browser.ts b/4mat/4mat.browser.ts index 64b930cf..8aed2694 100644 --- a/4mat/4mat.browser.ts +++ b/4mat/4mat.browser.ts @@ -95,9 +95,9 @@ export function assignCamelCase ( for (const property of allowed) { if (property in properties) { if (typeof property === 'string') { - object[Case.camel(property)] = properties[property] + (object as any)[Case.camel(property)] = properties[property] } else { - object[property] = properties[property] + (object as any)[property] = properties[property] } } } diff --git a/cmds/cmds-command.ts b/cmds/cmds-command.ts index 402ddadd..898a59c6 100644 --- a/cmds/cmds-command.ts +++ b/cmds/cmds-command.ts @@ -12,15 +12,17 @@ export default class Command extends Timed { steps: Step[] log: Console - constructor (parameters: Partial> = {}) { + constructor ( + parameters: Pick, 'name'|'steps'> & + Partial, 'args'|'info'|'log'>> + ) { super() - this.name = parameters.name - this.args = parameters.args - this.info = parameters.info + this.name = parameters.name this.steps = parameters.steps - this.log = parameters.log || new Console(this.name) + this.args = parameters.args || '' + this.info = parameters.info || '' + this.log = parameters.log || new Console(this.name) Object.defineProperty(this, 'log', { enumerable: false, writable: true }) - this.args = parameters.args } /** Run the command with the specified arguments. */