콘텐츠로 이동

ask

이 콘텐츠는 아직 번역되지 않았습니다.

Module @netwiv/api/plugins/dialog · Kind Function

import { ask } from '@netwiv/api/plugins/dialog';

Shows a question dialog with Yes and No buttons.

Convenient wrapper for await message('msg', { buttons: 'YesNo' }) === 'Yes'

function ask(message: string, options?: string | ConfirmDialogOptions | undefined): Promise<boolean>
import { ask } from '@netwiv/api/plugins/dialog';
const yes = await ask('Are you sure?', 'Tauri');
const yes2 = await ask('This action cannot be reverted. Are you sure?', { title: 'Tauri', kind: 'warning' });

Upstream since 2.0.0


Descriptions come from the pinned @tauri-apps/plugin-dialog@2.7.3 declarations (MIT OR Apache-2.0); imports are shown with @netwiv/api paths.