actionhero
Version:
The reusable, scalable, and quick node.js API server for stateless and stateful applications
17 lines (14 loc) • 441 B
text/typescript
import { Action, action } from "./../index";
export class RecursiveAction extends Action {
constructor() {
super();
this.name = "recursiveAction";
this.description = "I am an action that runs another action";
this.outputExample = {};
}
async run() {
const localResponse = { local: true };
const actionResponse = await action.run("randomNumber");
return Object.assign(actionResponse, localResponse);
}
}