View as Markdown

API reference: @salmonui/notifications/toast

ToastQueueOptionsinterface

import type { ToastQueueOptions } from '@salmonui/notifications/toast';
interface ToastQueueOptions {
    max?: number | undefined;
    now?: (() => number) | undefined;
    setTimeout?: ((callback: () => void, ms: number) => unknown) | undefined;
    clearTimeout?: ((handle: unknown) => void) | undefined;
}
ToastQueueOptions members (4)
NameSignatureDescription
maxoptionalmax?: number | undefined;

Visible toasts; the rest wait. Default 5.

nowoptionalnow?: (() => number) | undefined;

Clock for tests. Default Date.now.

setTimeoutoptionalsetTimeout?: ((callback: () => void, ms: number) => unknown) | undefined;

Timer for tests. Default globalThis.setTimeout.

clearTimeoutoptionalclearTimeout?: ((handle: unknown) => void) | undefined;

Timer for tests. Default globalThis.clearTimeout.