PluginRegistration
interfaz Desde 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";Código fuente src/app/definitions/define-plugin.ts:151
Declaración #
ts
interface PluginRegistration {
readonly plugin: unknown
readonly options?: unknown
readonly name?: string
}Ejemplo #
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
#
readonly plugin: unknownExport por defecto del archivo del plugin; se comprueba al arrancar.