10BC0 Fix isolate outer si typing by wclr · Pull Request #950 · cyclejs/cyclejs · GitHub
[go: up one dir, main page]

Skip to content

Conversation

wclr
Copy link
Contributor
@wclr wclr commented Aug 29, 2020
  • There exists an issue discussing the need for this PR
  • I added new tests for the issue I fixed or built
  • I used pnpm run commit instead of git commit
  const X = (s: { DOM: MainDOMSource }) => {
    return {
      DOM: xs.of(img()),
    }
  }

const IsolatedX = isolate(X)
const x =  IsolatedX({ DOM })
// now x.DOM  is Stream<VNode> instead of Stream<any>
x.DOM.map((vnode) => vnode.children) 

@wclr
Copy link
Contributor Author
wclr commented Aug 31, 2020

The with isolate with typings also refers to staltz/xstream#306
as I'm using a distinct version of MemoryStream type which Stream is not assignable to.

@staltz
So I'm not proposing to merge this PR as there may be other issues related to this, but want to draw your attention, to that isolate tyings actually does not work correctly now and using explicit any in public API like here, in this case, is not a very good thing.

PR #949 actually fixes this issue with isolating DOM sink with current DOM driver without need of this PR.

@wclr wclr mentioned this pull request Aug 31, 2020
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0