UNPKG

@wildboar/rose

Version:
30 lines (29 loc) 794 B
/** * @summary Forward * @description * * **This production was manually written in TypeScript.** * * ### ASN.1 Definition: * * ```asn1 * Forward{OPERATION:OperationSet} OPERATION ::= {OperationSet | OperationSet.&Linked.&Linked | * OperationSet.&Linked.&Linked.&Linked.&Linked} * ``` * * @type {OPERATION} */ export function Forward(OperationSet) { return [ ...OperationSet, ...OperationSet .flatMap((op1) => op1["&Linked"] ?.flatMap((op2) => op2["&Linked"] ?? []) ?? []), ...OperationSet .flatMap((op1) => op1["&Linked"] ?.flatMap((op2) => op2["&Linked"] ?.flatMap((op3) => op3["&Linked"] ?.flatMap((op4) => op4["&Linked"]) ?? []) ?? []) ?? []), ]; } /* eslint-enable */