@tsed/formio
Version:
Formio package for Ts.ED framework
19 lines (18 loc) • 449 B
JavaScript
import { Context } from "@tsed/platform-params";
/**
* Return the current action context with the following data:
*
* ```typescript
* export type ActionCtx = {
* handler: string;
* method: string;
* setActionItemMessage: SetActionItemMessage;
* action: FormioAction;
* };
* ```
* @param expression
* @constructor
*/
export function ActionCtx(expression) {
return Context(["ACTION_CTX", expression].filter(Boolean).join("."));
}