PromptValue
What the user typed: the text, or a login's username and password.
Utilização
Choose the input style for a prompt.
Este tipo é usado por 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 }Declaração do tipo
export type PromptValue = string | { username: string; password: string };Tipo
string | { username: string; password: string;}Gerado a partir das declarações TypeScript públicas: assinaturas, props e predefinições vêm da fonte verificada, as descrições da sua JSDoc. Nenhuma predefinição é inventada.