|
8 | 8 | import {Subscriber} from './Subscriber'; |
9 | 9 | import {TeardownLogic} from './Subscription'; |
10 | 10 | import {Observable} from './Observable'; |
11 | | -import {Subscription} from './Subscription'; |
12 | | -import {Action} from './scheduler/Action'; |
13 | 11 | import './scheduler/MiscJSDoc'; |
14 | 12 | import './observable/dom/MiscJSDoc'; |
15 | 13 |
|
@@ -130,90 +128,3 @@ export class ObserverDoc<T> { |
130 | 128 | return void 0; |
131 | 129 | } |
132 | 130 | } |
133 | | - |
134 | | -/** |
135 | | - * An execution context and a data structure to order tasks and schedule their |
136 | | - * execution. Provides a notion of (potentially virtual) time, through the |
137 | | - * `now()` getter method. |
138 | | - * |
139 | | - * Each unit of work in a Scheduler is called an {@link Action}. |
140 | | - * |
141 | | - * ```ts |
142 | | - * interface Scheduler { |
143 | | - * now(): number; |
144 | | - * schedule(work, delay?, state?): Subscription; |
145 | | - * flush(): void; |
146 | | - * active: boolean; |
147 | | - * actions: Action[]; |
148 | | - * scheduledId: number; |
149 | | - * } |
150 | | - * ``` |
151 | | - * |
152 | | - * @interface |
153 | | - * @name Scheduler |
154 | | - * @noimport true |
155 | | - */ |
156 | | -export class SchedulerDoc { |
157 | | - /** |
158 | | - * A getter method that returns a number representing the current time |
159 | | - * (at the time this function was called) according to the scheduler's own |
160 | | - * internal clock. |
161 | | - * @return {number} A number that represents the current time. May or may not |
162 | | - * have a relation to wall-clock time. May or may not refer to a time unit |
163 | | - * (e.g. milliseconds). |
164 | | - */ |
165 | | - now(): number { |
166 | | - return 0; |
167 | | - } |
168 | | - |
169 | | - /** |
170 | | - * Schedules a function, `work`, for execution. May happen at some point in |
171 | | - * the future, according to the `delay` parameter, if specified. May be passed |
172 | | - * some context object, `state`, which will be passed to the `work` function. |
173 | | - * |
174 | | - * The given arguments will be processed an stored as an Action object in a |
175 | | - * queue of actions. |
176 | | - * |
177 | | - * @param {function(state: ?T): ?Subscription} work A function representing a |
178 | | - * task, or some unit of work to be executed by the Scheduler. |
179 | | - * @param {number} [delay] Time to wait before executing the work, where the |
180 | | - * time unit is implicit and defined by the Scheduler itself. |
181 | | - * @param {T} [state] Some contextual data that the `work` function uses when |
182 | | - * called by the Scheduler. |
183 | | - * @return {Subscription} A subscription in order to be able to unsubscribe |
184 | | - * the scheduled work. |
185 | | - */ |
186 | | - schedule<T>(work: (state?: T) => Subscription | void, delay?: number, state?: T): Subscription { |
187 | | - return void 0; |
188 | | - } |
189 | | - |
190 | | - /** |
191 | | - * Prompt the Scheduler to execute all of its queued actions, therefore |
192 | | - * clearing its queue. |
193 | | - * @return {void} |
194 | | - */ |
195 | | - flush(): void { |
196 | | - return void 0; |
197 | | - } |
198 | | - |
199 | | - /** |
200 | | - * A flag to indicate whether the Scheduler is currently executing a batch of |
201 | | - * queued actions. |
202 | | - * @type {boolean} |
203 | | - */ |
204 | | - active: boolean = false; |
205 | | - |
206 | | - /** |
207 | | - * The queue of scheduled actions as an array. |
208 | | - * @type {Action[]} |
209 | | - */ |
210 | | - actions: Action<any>[] = []; |
211 | | - |
212 | | - /** |
213 | | - * An internal ID used to track the latest asynchronous task such as those |
214 | | - * coming from `setTimeout`, `setInterval`, `requestAnimationFrame`, and |
215 | | - * others. |
216 | | - * @type {number} |
217 | | - */ |
218 | | - scheduledId: number = 0; |
219 | | -} |
0 commit comments