Skip to content
Meeko
Type to search the guides and the API reference. Open it from any page with / or Ctrl K; move with the arrow keys and open a result with Enter.
Get started

Contents

On this page

Not translated yet

This page has not been translated into English yet, so it is shown in Spanish.

Deferred

interfaz

Valor del loader que puede llegar después de la página. Leer status, value o error en una plantilla o un effect se suscribe a su resultado.

ts
import type { Deferred } from "@meekojs/meeko/framework";

Source code src/app/runtime/deferred.ts:83

Declaración #

ts
interface Deferred<T> {
	readonly status: DeferredStatus
	readonly value: T | undefined
	readonly error: DeferredError | undefined
}

Type parameters #

T

Example #

meeko
<p if:when="props.data.comments.status === 'pending'">Cargando comentarios…</p>
<ul if:when="props.data.comments.status === 'resolved'">
  <li each:of="props.data.comments.value ?? []" each:as="comment">{comment.text}</li>
</ul>

Propiedades #

status #

propiedad sólo lectura

readonly status: DeferredStatus

"pending" hasta que el valor se resuelve o se rechaza.

value #

propiedad sólo lectura

readonly value: T | undefined

Valor resuelto, o undefined mientras no lo está.

error #

propiedad sólo lectura

readonly error: DeferredError | undefined

Fallo público si se rechazó.

See also #

Was this page helpful?

Add a comment

It is sent when you choose “Yes” or “No”. Only the page, your answer and the comment are stored: no cookies and no personal data.

0 of 2000 characters

Edit on GitHub: packages/meeko/src/app/runtime/deferred.ts