MCPcopy Create free account
hub / github.com/bombshell-dev/clack / PasswordOptions

Interface PasswordOptions

packages/prompts/src/password.ts:9–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7 * Options for the {@link password} prompt
8 */
9export interface PasswordOptions extends CommonOptions {
10 /**
11 * The prompt message or question shown to the user above the input.
12 */
13 message: string;
14
15 /**
16 * Character to use for masking input.
17 * @default ▪/•
18 */
19 mask?: string;
20
21 /**
22 * A function or a [Standard Schema](https://github.com/standard-schema/standard-schema)
23 * that validates user input. If a custom function is given, you should return a `string` or `Error`
24 * to show as a validation error, or `undefined` to accept the result.
25 */
26 validate?: Validate<string>;
27
28 /**
29 * When enabled it causes the input to be cleared if/when validation fails.
30 * @default false
31 */
32 clearOnError?: boolean;
33}
34
35/**
36 * The password prompt behaves like the {@link text} prompt, but the input is masked.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected