UNPKG

@tokens-studio/graph-engine

Version:

An execution engine to handle Token Studios generators and resolvers

24 lines 720 B
import { Node } from '../../programmatic/node.js'; import { NumberSchema } from '../../schemas/index.js'; export default class NodeDefinition extends Node { static title = 'Subtract'; static type = 'studio.tokens.math.subtract'; static description = 'Allows you to subtract two numbers.'; constructor(props) { super(props); this.addInput('a', { type: NumberSchema }); this.addInput('b', { type: NumberSchema }); this.addOutput('value', { type: NumberSchema }); } execute() { const { a, b } = this.getAllInputs(); this.outputs.value.set(a - b); } } //# sourceMappingURL=subtract.js.map