PromptValue
What the user typed: the text, or a login's username and password.
Usage
Choose the input style for a prompt.
This type is used by prompt
// Choose the input style for a prompt.
import { prompt, type PromptType } from 'kuito';
async function ask(title: string, type: PromptType) {
const answer = await prompt({ title, type });
return answer?.value ?? null;
}
const pin = await ask('Enter your PIN', 'password');
const login = await ask('Sign in to Wi-Fi', 'login'); // { username, password }Type declaration
export type PromptValue = string | { username: string; password: string };Type
string | { username: string; password: string;}Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.