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.

ServerRuntimeServices

tipo Since 1.7.0

Tipo de los servicios que devuelve una definición de runtime: el services del objeto que crea la fábrica o, si services es una función por petición, lo que ésta devuelve (sin la promesa). Sin services, unknown. Meeko lo usa para inferir AppServices de server/runtime.ts.

ts
import type { ServerRuntimeServices } from "@meekojs/meeko/server";

Source code src/server/runtime/definition.ts:182

Declaración #

ts
type ServerRuntimeServices<Definition> = Definition extends (...args: never[]) => infer Result ? (Awaited<Result> extends { readonly services?: infer Services } ? ServicesValue<Exclude<Services, undefined>> : unknown) : unknown

Type parameters #

Definition

Tipo de la fábrica, como typeof runtime de server/runtime.ts.

Example #

ts
import type { ServerRuntimeServices } from "@meekojs/meeko/server";
import type runtime from "../../runtime.js";

type Services = ServerRuntimeServices<typeof runtime>;
export function ready(services: Services): boolean {
  return services.db.connected;
}

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/server/runtime/definition.ts