我只是在和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}`))