transform-hub icon indicating copy to clipboard operation
transform-hub copied to clipboard

Could input and output streams be Duplexes?

Open MichalCz opened this issue 3 years ago • 3 comments

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

MichalCz avatar Nov 28 '21 13:11 MichalCz

thinking of https://github.com/scramjetorg/transform-hub/pull/628?

patuwwy avatar Aug 07 '22 00:08 patuwwy

or smth like

<T, U>(inout: DuplexStream<T, U>, ...args: any[]) => void

?

patuwwy avatar Feb 10 '23 16:02 patuwwy

Yup. Exactly like that

MichalCz avatar Feb 10 '23 18:02 MichalCz