/
eapostnova
/
2026-1--study--mathmod
Обзор
Документация
Войти
/
eapostnova
/
2026-1--study--mathmod
Код
Запросы
0
Задачи
Пакеты
0
Релизы
6
Аналитика
Безопасность
develop
node_modules/rxjs/src/internal/testing/SubscriptionLoggable.ts
21 строка
635 B
Елизавета Постнова
feat(lab): lab04
24 мар 2026, 02:59
Верифицирован
24 мар 2026, 02:59
7783508
Код
Авторство
О чём код?
import { Scheduler } from '../Scheduler'; import { SubscriptionLog } from './SubscriptionLog'; export class SubscriptionLoggable { public subscriptions: SubscriptionLog[] = []; scheduler: Scheduler; logSubscribedFrame(): number { this.subscriptions.push(new SubscriptionLog(this.scheduler.now())); return this.subscriptions.length - 1; } logUnsubscribedFrame(index: number) { const subscriptionLogs = this.subscriptions; const oldSubscriptionLog = subscriptionLogs[index]; subscriptionLogs[index] = new SubscriptionLog( oldSubscriptionLog.subscribedFrame, this.scheduler.now() ); } }