smartcli/dist/smartcli.classes.smartcli.d.ts

53 lines
1.5 KiB
TypeScript
Raw Normal View History

2016-08-26 07:21:42 +00:00
/// <reference types="q" />
import "typings-global";
2016-08-26 07:21:42 +00:00
import * as plugins from "./smartcli.plugins";
2016-08-26 09:52:09 +00:00
import { Objectmap } from "lik";
export interface commandPromiseObject {
commandName: string;
promise: plugins.q.Promise<any>;
}
export declare class Smartcli {
argv: any;
questionsDone: any;
parseStarted: any;
commands: any;
questions: any;
version: string;
2016-08-26 09:52:09 +00:00
allCommandPromises: Objectmap<commandPromiseObject>;
constructor();
2016-08-26 07:21:42 +00:00
/**
* adds an alias, meaning one equals the other in terms of triggering associated commands
*/
addAlias(keyArg: any, aliasArg: any): void;
2016-08-26 07:21:42 +00:00
/**
* 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(definitionArg: {
commandName: string;
2016-09-04 15:50:10 +00:00
}): plugins.q.Promise<any>;
2016-08-26 07:21:42 +00:00
/**
* gets a Promise for a command word
*/
2016-08-26 09:52:09 +00:00
getCommandPromiseByName(commandNameArg: string): plugins.q.Promise<any>;
/**
* allows to specify help text to be printed above the rest of the help text
*/
addHelp(optionsArg: {
helpText: string;
}): void;
2016-08-26 09:52:09 +00:00
/**
* specify version to be printed for -v --version
*/
addVersion(versionArg: string): void;
2016-08-26 09:52:09 +00:00
/**
* returns promise that is resolved when no commands are specified
*/
2016-09-04 15:50:10 +00:00
standardTask(): plugins.q.Promise<any>;
2016-09-04 15:32:12 +00:00
/**
* start the process of evaluating commands
*/
startParse(): void;
2016-06-09 12:03:18 +00:00
}