import { ICommand } from '../common/types' ; export abstract class BaseCommand < T > implements ICommand < T > { private _arguments : any [ ] = [ ] ; public get arguments ( ) { return this . _arguments ; } private _command = '' ; private _title = '' ; private _description = '' ; private _detail ? : string ; private _tooltip ? : string ; public get command ( ) { return this . _command ; } public get title ( ) { return this . _title ; } public get label ( ) { return this . _title ; } public get description ( ) { return this . _description ; } public get detail ( ) { return this . _detail ; } public get tooltip ( ) { return this . _tooltip ; } constructor ( public readonly data ) { } public abstract execute ( ) ; public async preExecute ( ) { return true ; } protected setTitle ( value ) { this . _title = value ; } protected setCommand ( value ) { this . _command = value ; } protected setCommandArguments ( args ) { this . _arguments = args ; } protected setDescription ( value ) { this . _description = value ; } protected setDetail ( value ) { this . _detail = value ; } protected setTooltip ( value ) { this . _tooltip = value ; } }