From 45d3ce8ffc7ff7ab0f01728a4b0d920d31308024 Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Thu, 12 Oct 2017 20:38:34 +0200 Subject: [PATCH] fix linting issues --- ts/smartcli.classes.smartcli.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/ts/smartcli.classes.smartcli.ts b/ts/smartcli.classes.smartcli.ts index d745ec2..1733eaf 100644 --- a/ts/smartcli.classes.smartcli.ts +++ b/ts/smartcli.classes.smartcli.ts @@ -44,7 +44,7 @@ export class Smartcli { /** * adds an alias, meaning one equals the other in terms of command execution. */ - addCommandAlias(keyArg, aliasArg): void { + addCommandAlias (keyArg, aliasArg): void { this.argv = this.argv.alias(keyArg, aliasArg) return } @@ -53,7 +53,7 @@ export class Smartcli { * adds a Command by returning a Promise that reacts to the specific commandString given. * Note: in e.g. "npm install something" the "install" is considered the command. */ - addCommand(commandNameArg: string): Promise { + addCommand (commandNameArg: string): Promise { let done = smartq.defer() this.allCommandPromisesMap.add({ commandName: commandNameArg, @@ -71,16 +71,16 @@ export class Smartcli { /** * gets a Promise for a command word */ - getCommandPromiseByName(commandNameArg: string): Promise { + getCommandPromiseByName (commandNameArg: string): Promise { return this.allCommandPromisesMap.find(commandDeferredObjectArg => { return commandDeferredObjectArg.commandName === commandNameArg }).promise } /** - * adds a Trigger. Like addCommand(), but returns an subscribable observable + * adds a Trigger. Like addCommand(), but returns an subscribable observable */ - addTrigger(triggerNameArg: string) { + addTrigger (triggerNameArg: string) { let triggerSubject = new Subject() this.allTriggerObservablesMap.add({ triggerName: triggerNameArg, @@ -96,7 +96,7 @@ export class Smartcli { * execute trigger by name * @param commandNameArg - the name of the command to trigger */ - trigger(triggerName: string) { + trigger (triggerName: string) { let triggerSubject = this.allTriggerObservablesMap.find(triggerObservableObjectArg => { return triggerObservableObjectArg.triggerName === triggerName }).subject @@ -107,7 +107,7 @@ export class Smartcli { /** * allows to specify help text to be printed above the rest of the help text */ - addHelp(optionsArg: { + addHelp (optionsArg: { helpText: string }) { this.addCommand('help').then(argvArg => { @@ -118,7 +118,7 @@ export class Smartcli { /** * specify version to be printed for -v --version */ - addVersion(versionArg: string) { + addVersion (versionArg: string) { this.version = versionArg this.addCommandAlias('v', 'version') this.parseStarted.promise @@ -132,7 +132,7 @@ export class Smartcli { /** * returns promise that is resolved when no commands are specified */ - standardTask(): Promise { + standardTask (): Promise { let done = smartq.defer() this.allCommandPromisesMap.add({ commandName: 'standard', @@ -150,7 +150,7 @@ export class Smartcli { /** * start the process of evaluating commands */ - startParse(): void { + startParse (): void { this.argv = this.argv.argv this.parseStarted.resolve() return