Skip to content

Commit eceace0

Browse files
committed
Add missing API exports
1 parent 8ef8351 commit eceace0

File tree

4 files changed

+30
-0
lines changed

4 files changed

+30
-0
lines changed

common/reviews/api/ts-command-line.api.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,13 @@ class CommandLineParameterProvider {
9191
renderHelpText(): string;
9292
}
9393

94+
// @public
95+
class CommandLineParameterWithArgument<T> extends CommandLineParameter<T> {
96+
// @internal
97+
constructor(definition: IBaseCommandLineDefinitionWithArgument);
98+
readonly argumentName: string | undefined;
99+
}
100+
94101
// @public
95102
class CommandLineParser extends CommandLineParameterProvider {
96103
constructor(options: ICommandLineParserOptions);
@@ -138,6 +145,11 @@ interface IBaseCommandLineDefinition {
138145
parameterShortName?: string;
139146
}
140147

148+
// @public
149+
interface IBaseCommandLineDefinitionWithArgument extends IBaseCommandLineDefinition {
150+
argumentName: string;
151+
}
152+
141153
// @public
142154
interface ICommandLineActionOptions {
143155
actionVerb: string;

libraries/ts-command-line/src/CommandLineDefinition.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ export interface IBaseCommandLineDefinition {
2323
description: string;
2424
}
2525

26+
/**
27+
* The common base interface for parameter types that accept an argument.
28+
*
29+
* @remarks
30+
* An argument is an accompanying command-line token, such as "123" in the
31+
* example "--max-count 123".
32+
* @public
33+
*/
2634
export interface IBaseCommandLineDefinitionWithArgument extends IBaseCommandLineDefinition {
2735
/**
2836
* The name of the argument, which will be shown in the command-line help.

libraries/ts-command-line/src/CommandLineParameter.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,14 @@ export abstract class CommandLineParameter<T> {
9696
public abstract get kind(): CommandLineParameterKind;
9797
}
9898

99+
/**
100+
* The common base class for parameters types that receive an argument.
101+
*
102+
* @remarks
103+
* An argument is an accompanying command-line token, such as "123" in the
104+
* example "--max-count 123".
105+
* @public
106+
*/
99107
export abstract class CommandLineParameterWithArgument<T> extends CommandLineParameter<T> {
100108
private static _invalidArgumentNameRegExp: RegExp = /[^A-Z_0-9]/;
101109

libraries/ts-command-line/src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export {
1414

1515
export {
1616
IBaseCommandLineDefinition,
17+
IBaseCommandLineDefinitionWithArgument,
1718
ICommandLineFlagDefinition,
1819
ICommandLineStringDefinition,
1920
ICommandLineStringListDefinition,
@@ -24,6 +25,7 @@ export {
2425
export {
2526
CommandLineParameterKind,
2627
CommandLineParameter,
28+
CommandLineParameterWithArgument,
2729
CommandLineStringParameter,
2830
CommandLineStringListParameter,
2931
CommandLineFlagParameter,

0 commit comments

Comments
 (0)