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.

MeekoSession

interfaz Since 1.2.0

Forma de los datos de sesión de la aplicación (desde 1.2). Está vacía: la aplicación la declara una vez con una aumentación de módulo y, a partir de ahí, context.session.current.data y context.session.create(data) quedan tipados en páginas, API, RPC, Socket, authorize y locals. Sin declaración, los datos son unknown. El tipo no valida en ejecución.

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

Source code src/server/runtime/sessions.ts:27

Declaración #

ts
interface MeekoSession {}

Example #

ts
// server/types/session.d.ts
import type {} from "@meekojs/meeko/server";
declare module "@meekojs/meeko/server" {
  interface MeekoSession { user: string; role: "owner" | "staff" }
}

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/sessions.ts