From a3e1fb8859a7e74597133d08c3821f766fca77a3 Mon Sep 17 00:00:00 2001 From: Ben Lesh Date: Thu, 5 Apr 2018 08:07:51 -0700 Subject: [PATCH] fix(Scheduler): export but deprecate (#3522) There are a lot of people extending Scheduler, they really should not be, but we can give them time to fix things on their end before removing the reexport of Scheduler. Scheduler is an internal implementation detail. --- src/index.ts | 3 ++- src/internal/Scheduler.ts | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 1d145f6d20..49d5534968 100644 --- a/src/index.ts +++ b/src/index.ts @@ -16,6 +16,7 @@ export { async as asyncScheduler } from './internal/scheduler/async'; export { queue as queueScheduler } from './internal/scheduler/queue'; export { animationFrame as animationFrameScheduler } from './internal/scheduler/animationFrame'; export { VirtualTimeScheduler, VirtualAction } from './internal/scheduler/VirtualTimeScheduler'; +export { Scheduler } from './internal/Scheduler'; /* Subscription */ export { Subscription } from './internal/Subscription'; @@ -70,4 +71,4 @@ export { NEVER } from './internal/observable/never'; export * from './internal/types'; /* Config */ -export { config } from './internal/config'; \ No newline at end of file +export { config } from './internal/config'; diff --git a/src/internal/Scheduler.ts b/src/internal/Scheduler.ts index 49ae5d00ed..30ca9574d0 100644 --- a/src/internal/Scheduler.ts +++ b/src/internal/Scheduler.ts @@ -17,6 +17,9 @@ import { SchedulerLike, SchedulerAction } from './types'; * ``` * * @class Scheduler + * @deprecated Scheduler is an internal implementation detail of RxJS, and + * should not be used directly. Rather, create your own class and implement + * {@link SchedulerLike} */ export class Scheduler implements SchedulerLike {