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.

DeferredFactory

tipo

Fábrica de un valor diferido: Meeko la llama cuando el loader devuelve. signal se aborta cuando el valor deja de esperarse: plazo agotado, cliente desconectado, sesión revocada, stream cancelado, petición HEAD o, en el navegador, al salir de la ruta.

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

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

Declaración #

ts
type DeferredFactory<T> = (signal: AbortSignal) => PromiseLike<T> | T

Type parameters #

T

Example #

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

const loadComments: DeferredFactory<string[]> = async (signal) => {
  const response = await fetch("https://api.example.com/comments", { signal });
  return response.json();
};

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