Add ReadableStream and WritableStream to NoStreamStdioOption#1226
Add ReadableStream and WritableStream to NoStreamStdioOption#1226rovo89 wants to merge 1 commit intosindresorhus:mainfrom
Conversation
|
Hi @rovo89, When a |
|
Oh OK, so there is different behavior between passing Writable and WritableStream? I thought that "features" of one also apply to the other, therefore I was confused to see that I got a type warning for the former and not for the latter. Which kind of stream do we get then? A ReadableStream when we pass in a WritableStream? Didn't find docs for that. |
|
Yes, the behavior is different. Execa is a wrapper around The documentation about it is here. |
|
OK, thanks for the clarification. My thought was that if I pass a stream and nothing else, the command sends the output there and then it's "lost". Actually, my case was about |
Not 100% sure about this one, but when passing a
WritableStreamfor stdout/stderr, it doesn't flag those variables as possibly undefined. My understanding is that the streams are pretty much equivalent when it comes to collecting the output or not.