You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, MemoryStream and Stream has exactly the same API surface. Though MemoryStream is actually a descendant from Stream which is a more abstract case.
So, now:
// those are both valid casesconststream: Stream<any>=xs.createWithMemory()// is validconstmemoryStream: MemoryStream<any>=xs.create()// is valid
Though it seems that the latter case would better be invalid in terms of type checking. If you expect MemoryStream you probably should not expect or want just Stream as an input.
Currently, I fix this:
declare module 'xstream'{interfaceMemoryStream<T>{// make MemoryStream distinctive from Stream__withMemory: true// this could be any prop, here}
But such distinction could be introduced in xstream by design. Maybe this issue could also relate to #304 which is runtime case for finding a distinction between types of streams.
The text was updated successfully, but these errors were encountered:
Currently,
MemoryStream
andStream
has exactly the same API surface. ThoughMemoryStream
is actually a descendant fromStream
which is a more abstract case.So, now:
Though it seems that the latter case would better be invalid in terms of type checking. If you expect
MemoryStream
you probably should not expect or want justStream
as an input.Currently, I fix this:
But such distinction could be introduced in
xstream
by design. Maybe this issue could also relate to #304 which is runtime case for finding a distinction between types of streams.The text was updated successfully, but these errors were encountered: