Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ts-command-line] Expand the ts-command-line choice parameter APIs. #4975

Merged
merged 2 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fixup! Expand the ts-command-line choice paramter APIs.
  • Loading branch information
iclanton committed Oct 17, 2024
commit b64fa3cd29e5cd5efcf6c308e1ab63ea15e413b9
6 changes: 3 additions & 3 deletions common/reviews/api/ts-command-line.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ export interface IBaseCommandLineDefinition {
// @public
export interface IBaseCommandLineDefinitionWithArgument extends IBaseCommandLineDefinition {
argumentName: string;
completions?: (() => Promise<ReadonlyArray<string> | ReadonlySet<string>>) | undefined;
completions?: () => Promise<ReadonlyArray<string> | ReadonlySet<string>>;
}

// @public
Expand All @@ -356,14 +356,14 @@ export interface ICommandLineActionOptions {
// @public
export interface ICommandLineChoiceDefinition<TChoice extends string = string> extends IBaseCommandLineDefinition {
alternatives: ReadonlyArray<TChoice> | ReadonlySet<TChoice>;
completions?: (() => Promise<ReadonlyArray<TChoice> | ReadonlySet<TChoice>>) | undefined;
completions?: () => Promise<ReadonlyArray<TChoice> | ReadonlySet<TChoice>>;
defaultValue?: TChoice;
}

// @public
export interface ICommandLineChoiceListDefinition<TChoice extends string = string> extends IBaseCommandLineDefinition {
alternatives: ReadonlyArray<TChoice> | ReadonlySet<TChoice>;
completions?: (() => Promise<ReadonlyArray<TChoice> | ReadonlySet<TChoice>>) | undefined;
completions?: () => Promise<ReadonlyArray<TChoice> | ReadonlySet<TChoice>>;
}

// @public
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export interface IBaseCommandLineDefinitionWithArgument extends IBaseCommandLine
*
* In a future release, this will be renamed to `getCompletionsAsync`
*/
completions?: (() => Promise<ReadonlyArray<string> | ReadonlySet<string>>) | undefined;
completions?: () => Promise<ReadonlyArray<string> | ReadonlySet<string>>;
}

/**
Expand Down Expand Up @@ -159,7 +159,7 @@ export interface ICommandLineChoiceDefinition<TChoice extends string = string>
* This option is only used when `ICommandLineParserOptions.enableTabCompletionAction`
* is enabled.
*/
completions?: (() => Promise<ReadonlyArray<TChoice> | ReadonlySet<TChoice>>) | undefined;
completions?: () => Promise<ReadonlyArray<TChoice> | ReadonlySet<TChoice>>;
}

/**
Expand All @@ -182,7 +182,7 @@ export interface ICommandLineChoiceListDefinition<TChoice extends string = strin
* This option is only used when `ICommandLineParserOptions.enableTabCompletionAction`
* is enabled.
*/
completions?: (() => Promise<ReadonlyArray<TChoice> | ReadonlySet<TChoice>>) | undefined;
completions?: () => Promise<ReadonlyArray<TChoice> | ReadonlySet<TChoice>>;
}

/**
Expand Down
Loading