(def: DefRecord)
| 104 | } |
| 105 | |
| 106 | /** `args` split on the commas that separate PARAMETERS — those outside any |
| 107 | * `(`, `<` or `[` group. The `>` of an ARROW (`->`) closes nothing: without |
| 108 | * that exclusion a constructor argument containing an arrow |
| 109 | * (`list<(unknown, T) any -> unknown>`) reads as unbalanced and every |
| 110 | * parameter after it merges into one. */ |
| 111 | function topLevelParams(args: string): string[] { |
| 112 | const out: string[] = []; |
| 113 | let depth = 0; |
| 114 | let current = ''; |