@warp-works/core
Version:
Core library for WarpWorks
28 lines (24 loc) • 652 B
JavaScript
const Base = require('./base');
class Action extends Base {
constructor(parent, id, name, desc) {
super("Action", parent, id, name, desc);
this.icon = "Icon Name";
this.label = "Label";
this.functionName = "Function Name";
}
toString() {
return this.functionName;
}
toJSON() {
return {
name: this.name,
desc: this.desc,
type: this.type,
id: this.idToJSON(),
icon: this.icon,
label: this.label,
functionName: this.functionName
};
}
}
module.exports = Action;