@tokens-studio/graph-engine
Version:
An execution engine to handle Token Studios generators and resolvers
24 lines • 732 B
JavaScript
import { AnySchema } from '../../schemas/index.js';
import { Node } from '../../programmatic/node.js';
/**
* A node that passes through the input to the output.
*/
export default class NodeDefinition extends Node {
static title = 'Passthrough';
static type = 'studio.tokens.generic.passthrough';
static description = 'Passes a value through to the output';
constructor(props) {
super(props);
this.addInput('value', {
type: AnySchema
});
this.addOutput('value', {
type: AnySchema
});
}
execute() {
const input = this.inputs.value;
this.outputs.value.set(input.value, input.type);
}
}
//# sourceMappingURL=passthrough.js.map