UNPKG

shelving

Version:

Toolkit for using data in JavaScript.

22 lines (21 loc) 822 B
import type { ReactNode } from "react"; import { DataStore } from "../../store/DataStore.js"; import type { NoticesStore } from "./NoticesStore.js"; type NoticeData<S extends string> = { readonly status?: S | undefined; readonly children?: ReactNode | undefined; }; /** Store a single notice. */ export declare class NoticeStore<S extends string> extends DataStore<NoticeData<S>> { private _notices; readonly key: string; constructor(notices: NoticesStore<S>, children?: ReactNode | null, status?: S | undefined); show(children?: ReactNode | undefined, status?: S | undefined): void; /** Close this notice (permanently). */ close(): void; write(data: NoticeData<S>): void; protected _autoclose(): void; private _timeout; [Symbol.asyncDispose](): Promise<void>; } export {};