PersistentAI API Documentation / @persistent-ai/fireflow-types / setPortValueSafely
Function: setPortValueSafely()
setPortValueSafely(
node,portKey,value,parentId?,expectedType?):void
Defined in: packages/fireflow-types/src/tool/node-from-tool.ts:247
Safely sets a port value with type validation and coercion.
Parameters
node
BaseNodeCompositional
The node
portKey
string
Port key to set
value
any
Value to set
parentId?
string
Parent port ID for nested properties
expectedType?
string
Expected type from schema for coercion
Returns
void
Throws
Error if port not found or type coercion fails