| 7 | * Options for the {@link password} prompt |
| 8 | */ |
| 9 | export 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. |
nothing calls this directly
no outgoing calls
no test coverage detected