transform-hub
transform-hub copied to clipboard
Could input and output streams be Duplexes?
Feature description
Currently the signature of a program is:
<T,U>(inp: ReadableStream<T>, ...args: any[]) => AnyReadable<U>
This means that all the programs we can support are unidirectional. That's cool, but makes a "hairpin" solution very tricky. We could make the developers' lives much easier by simply letting systems respond directly.
Is it loooads of work? @alicja-gruzdz @patuwwy
thinking of https://github.com/scramjetorg/transform-hub/pull/628?
or smth like
<T, U>(inout: DuplexStream<T, U>, ...args: any[]) => void
?
Yup. Exactly like that