(fn: FunctionDeclaration)
| 20 | /** Domain declaration → wire pieces: flatten the signature and lift each output's |
| 21 | * expression into the `outputAssignments` map keyed by output uid. */ |
| 22 | export function serialize(fn: FunctionDeclaration): SerializedFunction { |
| 23 | const outputAssignments: Record<string, Expression> = {}; |
| 24 | for (const o of fn.outputs) outputAssignments[o.uid] = o.expression; |
| 25 | return { functionInfo: toFunctionInfo(fn), outputAssignments }; |
| 26 | } |
| 27 | |
| 28 | /** Wire pieces → domain declaration: bundle each `return` with its assignment. A |
| 29 | * return with no stored assignment gets an empty expression of the right dataType. */ |
nothing calls this directly
no test coverage detected