PromptValue
What the user typed: the text, or a login's username and password.
Verwendung
Choose the input style for a prompt.
Dieser Typ wird verwendet von 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 }Typdeklaration
export type PromptValue = string | { username: string; password: string };Typ
string | { username: string; password: string;}Generiert aus den öffentlichen TypeScript-Deklarationen: Signaturen, Props und Standardwerte stammen aus der geprüften Quelle, Beschreibungen aus deren JSDoc. Kein Standardwert ist erfunden.