@deployport/specular-runtime
Version:
Runtime for Specular API clients with support for Node.js and Browser
20 lines (19 loc) • 490 B
JavaScript
export default class Operation {
name;
resource;
input;
output;
annotations = [];
constructor({ resource, name, input, output }) {
this.resource = resource;
this.name = name;
this.input = input;
this.output = output;
resource._addOperation(this);
}
_addAnnotation(annotation, config) {
config?.(annotation);
this.annotations = this.annotations || [];
this.annotations.push(annotation);
}
}