Optionalallow?: Record<string, Named>a set of terms that are allowed in the returned list (aside from the input list).
Optionalenv?: Record<string, Named>a set of terms assumed to be known (and thus not required in the output list).
Optionallist?: Expr | Expr[]a single expression or a list of expressions to sort.
Topologically sort a list of terms, extending it with any missing dependency terms, if necessary. The output list is guaranteed to contain at least the input terms.