(node: BaseRoot, name: string)
| 36 | |
| 37 | // name keys the root's resolution, so it must be what its unit names it |
| 38 | export const writeRootApply = (node: BaseRoot, name: string): string => { |
| 39 | const [reads, rootApply, applyFailed] = rootApplyParts(node, name) |
| 40 | return `"use strict"\nconst ${reads.join(", ")}\n${applyFailed ? `const applyFailed = ${applyFailed}\n` : ""}return (${rootApply})` |
| 41 | } |
| 42 | |
| 43 | // the node members a root apply reads, as `member = node.member`, its function |
| 44 | // and the one its failure path is. An artifact's reads its name from the node, |
no test coverage detected