Skip to content

Interface: AutocompleteOptions<Value> ​

Defined in: node_modules/.pnpm/@clack+prompts@1.9.0/node_modules/@clack/prompts/dist/index.d.mts:145

Extends ​

  • AutocompleteSharedOptions<Value>

Type Parameters ​

Type Parameter

Value

Properties ​

PropertyTypeDescriptionInherited fromDefined in

accessible?

boolean

‐

AutocompleteSharedOptions.accessible

node_modules/.pnpm/@clack+prompts@1.9.0/node_modules/@clack/prompts/dist/index.d.mts:42

completeOnTab?

boolean

When true, pressing Tab fills the input with the currently focused option's value, as if the user had typed it.

‐

node_modules/.pnpm/@clack+prompts@1.9.0/node_modules/@clack/prompts/dist/index.d.mts:158

filter?

(search, option) => boolean

Custom filter function to match options against the search input.

AutocompleteSharedOptions.filter

node_modules/.pnpm/@clack+prompts@1.9.0/node_modules/@clack/prompts/dist/index.d.mts:143

initialUserInput?

string

The starting value shown in the users input box.

‐

node_modules/.pnpm/@clack+prompts@1.9.0/node_modules/@clack/prompts/dist/index.d.mts:153

initialValue?

Value

The initially selected option from the list.

‐

node_modules/.pnpm/@clack+prompts@1.9.0/node_modules/@clack/prompts/dist/index.d.mts:149

input?

Readable

‐

AutocompleteSharedOptions.input

node_modules/.pnpm/@clack+prompts@1.9.0/node_modules/@clack/prompts/dist/index.d.mts:38

maxItems?

number

The maximum number of items/options to display in the autocomplete list at once.

AutocompleteSharedOptions.maxItems

node_modules/.pnpm/@clack+prompts@1.9.0/node_modules/@clack/prompts/dist/index.d.mts:128

message

string

The message or question shown to the user above the input.

AutocompleteSharedOptions.message

node_modules/.pnpm/@clack+prompts@1.9.0/node_modules/@clack/prompts/dist/index.d.mts:117

options

| Option<Value>[] | ((this) => Option<Value>[])

The options to present, or a function that returns the options to present allowing for custom search/filtering.

See

https://bomb.sh/docs/clack/packages/prompts/#dynamic-options-getter

AutocompleteSharedOptions.options

node_modules/.pnpm/@clack+prompts@1.9.0/node_modules/@clack/prompts/dist/index.d.mts:124

output?

Writable

‐

AutocompleteSharedOptions.output

node_modules/.pnpm/@clack+prompts@1.9.0/node_modules/@clack/prompts/dist/index.d.mts:39

placeholder?

string

Placeholder text displayed when the search field is empty. When set, pressing tab copies the placeholder into the input.

AutocompleteSharedOptions.placeholder

node_modules/.pnpm/@clack+prompts@1.9.0/node_modules/@clack/prompts/dist/index.d.mts:133

signal?

AbortSignal

‐

AutocompleteSharedOptions.signal

node_modules/.pnpm/@clack+prompts@1.9.0/node_modules/@clack/prompts/dist/index.d.mts:40

validate?

Validate<Value | Value[]>

A function or a Standard Schema that validates user input. If a custom function is given, you should return a string or Error to show as a validation error, or undefined to accept the result.

AutocompleteSharedOptions.validate

node_modules/.pnpm/@clack+prompts@1.9.0/node_modules/@clack/prompts/dist/index.d.mts:139

withGuide?

boolean

‐

AutocompleteSharedOptions.withGuide

node_modules/.pnpm/@clack+prompts@1.9.0/node_modules/@clack/prompts/dist/index.d.mts:41

基于 MIT 许可证发布