Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix flatten typings for TS 3.4 #276

Closed
wants to merge 1 commit into from
Closed

Fix flatten typings for TS 3.4 #276

wants to merge 1 commit into from

Conversation

wclr
Copy link
Contributor

@wclr wclr commented May 1, 2019

In later TS versions, it types flatten stream as Stream<{}>

  const mm$ = xs.createWithMemory<MemoryStream<number>>()
  const sm$ = xs.create<MemoryStream<number>>()
  const ms$ = xs.createWithMemory<Stream<number>>()
  const ss$ = xs.create<Stream<number>>()
  const fmm$ = mm$.flatten() // without fix this is typed to Stream<{}> not Stream<number>
  const fsm$ = sm$.flatten()
  const fms$ = ms$.flatten()
  const fss$ = ss$.flatten()

In later TS versions types flatten stream as `Stream<{}>`

```ts
  const mm$ = xs.createWithMemory<MemoryStream<number>>()
  const sm$ = xs.create<MemoryStream<number>>()
  const ms$ = xs.createWithMemory<Stream<number>>()
  const ss$ = xs.create<Stream<number>>()
  const fmm$ = mm$.flatten() // without fix this is typed to Stream<{}> not Stream<number>
  const fsm$ = sm$.flatten()
  const fms$ = ms$.flatten()
  const fss$ = ss$.flatten()
```
@wclr
Copy link
Contributor Author

wclr commented May 2, 2019

Closed in favor of #278

@wclr wclr closed this May 2, 2019
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.

1 participant