vue-blox-expressions
Version:
Adds scripting support to vue-blox.
25 lines (24 loc) • 874 B
TypeScript
import type { BloxPluginInterface, BloxContext } from 'vue-blox';
import type { Parser } from 'expr-eval';
/**
* A plugin that searches for keys that start with 'event:' and prepares the resulting prop to be a function that invokes the evaluation of the value string
* when the event is emitted from the component
*/
declare class BloxPluginEvent implements BloxPluginInterface {
parser: Parser;
constructor(parser: Parser);
run({ context, key, value, variables, buildContext }: {
context: BloxContext;
key: string;
value: any;
variables: any;
buildContext: ({ view, variables }: {
view: any;
variables: any;
}) => BloxContext | undefined;
}): void;
}
declare function getPluginEvent({ parser }: {
parser: Parser;
}): BloxPluginEvent;
export { BloxPluginEvent, getPluginEvent };