审核和限制之间的区别

时间:2020-01-24 12:33:46

标签: rxjs6 rxjs-pipeable-operators

我只是在和RxJS过滤运算符一起玩,我想知道使用以下设置的审核和限制之间有什么区别。

import { ThrottleConfig } from "rxjs/internal/operators/throttle";
import { throttleTime, startWith } from "rxjs/operators";
import { asyncScheduler } from "rxjs";
import { fromStdIn } from "../../utility";

const throttleConfig: ThrottleConfig = {
    leading: false,
    trailing: true
}

fromStdIn().pipe(
    throttleTime(2000, asyncScheduler, throttleConfig),
    startWith('Started')
).subscribe(evt=> console.log(`Double-typed! ${evt}`))

0 个答案:

没有答案