Export IScheduler, Scheduler, and TeardownLogic in the Rx module
See original GitHub issueRxJS 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:
- Created 6 years ago
- Comments:12 (6 by maintainers)
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.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.