Module Types.ToastPromiseComponentProps

type ('t, 'u) t = ('t, 'u) t_toast_promise_component_props

The state of the promise.

val state : ('t, 'u) t -> [ `pending | `fulfilled | `rejected ]

The resolved data of the promise when fulfilled.

The state of the promise.

val data : ('t, 'u) t -> 't option

The error of the promise when rejected.

The resolved data of the promise when fulfilled.

val error : ('t, 'u) t -> 'u option

A unique id for the toast.

The error of the promise when rejected.

val toast_id : ('t, 'u) t -> float

A unique id for the toast.

val make : state:[ `pending | `fulfilled | `rejected ] -> ?data:'t -> ?error:'u -> toast_id:float -> unit -> ('t, 'u) t