Import other modules into monorepo
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
32
src/cli/directive/options/PositionalOption.ts
Normal file
32
src/cli/directive/options/PositionalOption.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
import {CLIOption} from "./CLIOption"
|
||||
|
||||
/**
|
||||
* A positional CLI option. Defined without a flag.
|
||||
*/
|
||||
export class PositionalOption<T> extends CLIOption<T> {
|
||||
|
||||
/**
|
||||
* Instantiate the option.
|
||||
* @param {string} name - the name of the option
|
||||
* @param {string} message - message describing the option
|
||||
*/
|
||||
constructor(
|
||||
/**
|
||||
* The display name of this positional argument.
|
||||
* @example path, filename
|
||||
*/
|
||||
public readonly name: string,
|
||||
/**
|
||||
* A usage message describing this parameter.
|
||||
*/
|
||||
public readonly message: string = ''
|
||||
) { super() }
|
||||
|
||||
/**
|
||||
* Gets the name of the option.
|
||||
* @returns {string}
|
||||
*/
|
||||
getArgumentName () {
|
||||
return this.name
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user