Skip to main content

Action

@webda/core


Variable: Action

const Action: {(value, context): any; (...args): (value, context) => any; }

Defined in: packages/core/src/models/decorator.ts:52

Marker decorator used to expose a method as a model or Behavior action.

The body is intentionally empty. The compiler discovers @Action-decorated methods by inspecting the AST during module generation, then writes the action metadata into webda.module.json. At runtime the decorator simply returns the method untouched, so applying or omitting it has no behavioural effect on the method itself.

Both @Action (no parens) and @Action({...}) are supported.

Call Signature​

(value, context): any

Parameters​

value​

any

context​

any

Returns​

any

Call Signature​

(...args): (value, context) => any

Parameters​

args​

...[ActionOptions]

Returns​

(value, context) => any