N👩
Size: a a a
IB
export function destroyTimer<T>(dueTime: number): MonoTypeOperatorFunction<T> {
return (source: Observable<T>) => source.lift(new DestroyTimerOperator(dueTime));
}
class DestroyTimerOperator<T> implements Operator<T, T> {
constructor(private dueTime: number) {}
call(subscriber: Subscriber<T>, source: any): TeardownLogic {
return source.subscribe(new DestroyTimerSubscriber(subscriber, this.dueTime));
}
}
class DestroyTimerSubscriber<T, R> extends OuterSubscriber<T, R> {
private id;
constructor(destination: Subscriber<any>, dueTime: number) {
super(destination);
this.id = setTimeout(() => this.complete(), dueTime);
}
unsubscribe() {
super.unsubscribe();
clearTimeout(this.id);
}
}
Вキ
export function destroyTimer<T>(dueTime: number): MonoTypeOperatorFunction<T> {
return (source: Observable<T>) => source.lift(new DestroyTimerOperator(dueTime));
}
class DestroyTimerOperator<T> implements Operator<T, T> {
constructor(private dueTime: number) {}
call(subscriber: Subscriber<T>, source: any): TeardownLogic {
return source.subscribe(new DestroyTimerSubscriber(subscriber, this.dueTime));
}
}
class DestroyTimerSubscriber<T, R> extends OuterSubscriber<T, R> {
private id;
constructor(destination: Subscriber<any>, dueTime: number) {
super(destination);
this.id = setTimeout(() => this.complete(), dueTime);
}
unsubscribe() {
super.unsubscribe();
clearTimeout(this.id);
}
}
CN
export function destroyTimer<T>(dueTime: number): MonoTypeOperatorFunction<T> {
return (source: Observable<T>) => source.lift(new DestroyTimerOperator(dueTime));
}
class DestroyTimerOperator<T> implements Operator<T, T> {
constructor(private dueTime: number) {}
call(subscriber: Subscriber<T>, source: any): TeardownLogic {
return source.subscribe(new DestroyTimerSubscriber(subscriber, this.dueTime));
}
}
class DestroyTimerSubscriber<T, R> extends OuterSubscriber<T, R> {
private id;
constructor(destination: Subscriber<any>, dueTime: number) {
super(destination);
this.id = setTimeout(() => this.complete(), dueTime);
}
unsubscribe() {
super.unsubscribe();
clearTimeout(this.id);
}
}
Вキ
IB
Вキ
IB
D
Вキ
export function destroyTimer<T>(dueTime: number): MonoTypeOperatorFunction<T> {
return (source: Observable<T>) => source.lift(new DestroyTimerOperator(dueTime));
}
class DestroyTimerOperator<T> implements Operator<T, T> {
constructor(private dueTime: number) {}
call(subscriber: Subscriber<T>, source: any): TeardownLogic {
return source.subscribe(new DestroyTimerSubscriber(subscriber, this.dueTime));
}
}
class DestroyTimerSubscriber<T, R> extends OuterSubscriber<T, R> {
private id;
constructor(destination: Subscriber<any>, dueTime: number) {
super(destination);
this.id = setTimeout(() => this.complete(), dueTime);
}
unsubscribe() {
super.unsubscribe();
clearTimeout(this.id);
}
}
IB
ДМ
ДМ
IB
IB
ДМ
ДМ
IB