well, I could do this if I made connect an independent function taking both pipelines. But I'm not really into the Lisp aesthetic (connect(connect(connect(p1), p2, p3))
Thing is, a later pipeline step accepting string | number can handle an output of just number. But I can't tell Typescript "this type can be anything as long as it also accepts number" in a way that generates a type error for the function argument of connect.
Getting the type programming right fried my brain in addition to the heat.
Most of it works with regular type errors, except for this one case. Would be nice if there was an inverse to extends. Oh well, at least I made the message helpful
Anything that becomes Page<".html", string, ...> before the template hook in the pipeline will be processable by templates ingesting Page<".html", string, ...>.
I generalized the concept of templates to work with any page type. Most of the time they're going to ingest Page<".html", string, ...> as shown here, but you could have templates for anything