(functionInfo: FunctionInfo, outputAssignments: Record<string, Expression>)
| 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. */ |
| 30 | export function deserialize(functionInfo: FunctionInfo, outputAssignments: Record<string, Expression>): FunctionDeclaration { |
| 31 | return { |
| 32 | id: functionInfo.id, |
| 33 | version: functionInfo.version, |
| 34 | name: functionInfo.name, |
| 35 | arguments: functionInfo.arguments, |
| 36 | outputs: functionInfo.returns.map((r) => ({ |
| 37 | uid: r.uid, |
| 38 | name: r.name, |
| 39 | dataType: r.dataType, |
| 40 | expression: outputAssignments[r.uid] ?? { expression: "", references: [], dataType: r.dataType }, |
| 41 | })), |
| 42 | }; |
| 43 | } |
nothing calls this directly
no outgoing calls
no test coverage detected