question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Export IScheduler, Scheduler, and TeardownLogic in the Rx module

See original GitHub issue

RxJS version: 5.4.1

Code to reproduce:

import { IScheduler, TeardownLogic, Scheduler } from '@reactivex/rxjs';

Expected behavior:

Compiles when importing from the module, @reactivex/rxjs.

Actual behavior:

Does not compile as the symbols are not exported in Rx.ts.

Additional information:

Currently, the only way to use the IScheduler (or Scheduler, TeardownLogic, etc.) is to import it via the full dist modules, i.e. @reactivex/rxjs/dist/cjs/Scheduler. The problem with this is that IDEs and users can get confused and accidentally import src directories which causes issues with compilation around duplicate types as the compiler finds multiple names for the same type.

Ultimately, this comes down to an “ergonomics” concern and it seems strange to not export these types.

I tried searching for issues surrounding the justification for what types are exported and what aren’t, I didn’t find any discussions. If there are known/discussed justifications, please point me to them!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
kwonojcommented, Jul 6, 2017

What I’m saying is CJS package rxjs should have only single packages included, so it removes possibilities of same type definition staying around single package. It doesn’t changes import ergonomics in your code.

0reactions
lock[bot]commented, Jun 6, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TeardownLogic | RxJS API Document - ReactiveX
TeardownLogic. This interface describes what should be returned by function passed to Observable constructor or static create function.
Read more >
angularx-social-login-vk - UNPKG
hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var ... n * Rx.Scheduler.asap.schedule(() => console.log('asap'));\n *\n ...
Read more >
node_modules/rxjs/CHANGELOG.md ... - GitLab
Operators are all exported at the top level, from "rxjs". From here on out, we encourage top-level imports with RxJS. Importing from rxjs/operators...
Read more >
Source - GitHub
This puts us in-line with all other Rx implementations. ... Symbols are no longer exported directly from modules such as `rxjs/symbol/observable` please use ......
Read more >
RxJS dependency issue with Scheduler.async - Stack Overflow
What is actually the difference between Rx.Scheduler.async, Scheduler.async and async? – coder. Jun 3, 2017 at 12:17.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found