src/edit/command.js
// command is ran asynchronously through a prompt.
command is ran asynchronously through a prompt.
command is ran asynchronously through a prompt .
exec(pm, params) {
    let run = this.spec.run
    if (!params) {
      if (!this.params.length) return run.call(this.self, pm)
      return new pm.options.commandParamPrompt(pm, this).open()
    } else {
      if (this.params.length != (params ? params.length : 0))
        AssertionError.raise("Invalid amount of parameters for command " + this.name)
      return run.call(this.self, pm, ...params)
    }
  }
exec ( pm , params ) { let run = this . spec . run if ( ! params ) { if ( ! this . params . length ) return run . call ( this . self , pm ) return new pm . options . commandParamPrompt ( pm , this ) . open ( ) } else { if ( this . params . length != ( params ? params . length : 0 ) ) AssertionError . raise ( "Invalid amount of parameters for command " + this . name ) return run . call ( this . self , pm , ... params ) } }
command is ran asynchronously through a prompt.
command is ran asynchronously through a prompt .