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.

PluginRegistration

interfaz Since 1.2.0

Plugin con sus opciones, tal como lo listan las entradas generadas. Un módulo lo produce con meeko.addPlugin({ src, options }); un host propio lo pasa a mountClientApp o a createServerApp en plugins.

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

Source code src/app/definitions/define-plugin.ts:151

Declaración #

ts
interface PluginRegistration {
	readonly plugin: unknown
	readonly options?: unknown
	readonly name?: string
}

Example #

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

const greeting = definePlugin<{ text: string }>((app, options) => { console.log(options.text, app.side); });
const plugins: PluginRegistration[] = [{ plugin: greeting, options: { text: "hola" }, name: "greeting" }];

Propiedades #

plugin #

propiedad sólo lectura

readonly plugin: unknown

Export por defecto del archivo del plugin; se comprueba al arrancar.

options #

propiedad sólo lectura opcional

readonly options?: unknown

Opciones que recibe setup como segundo argumento.

name #

propiedad sólo lectura opcional

readonly name?: string

Nombre en los mensajes de error, como el archivo del plugin.

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/definitions/define-plugin.ts