Skip to content

Commit 622fabe

Browse files
authored
Add example of current process output assignment syntax
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
1 parent 5a58a22 commit 622fabe

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

adr/20260312-record-syntax-unification.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,20 @@ process FASTQC {
8080
}
8181
```
8282

83+
The output can optionally be an assignment with a type annotation:
84+
85+
```nextflow
86+
output:
87+
result: FastqcResult = record(
88+
id: sample.id,
89+
html: file('*.html'),
90+
zip: file('*.zip')
91+
)
92+
```
93+
8394
- Good, because input block syntax mirrors the top-level `record` definition.
8495
- Bad, because two different notations for the same concept in the same process definition.
8596
- Bad, because `Record { ... }` block syntax only exists in input declarations — it is not a general-purpose construct.
86-
- Bad, because output `record()` as a bare statement (no assignment) doesn't allow naming the output.
8797

8898
### Option 2: Block syntax for both inputs and outputs
8999

0 commit comments

Comments
 (0)