PHP WebShell
Текущая директория: /opt/BitGoJS/node_modules/xstream/extra
Просмотр файла: throttle.d.ts
import { Stream } from '../index';
/**
* Emits event and drops subsequent events until a certain amount of silence has passed.
*
* Marble diagram:
*
* ```text
* --1-2-----3--4----5|
* throttle(60)
* --1-------3-------5-|
* ```
*
* Example:
*
* ```js
* import fromDiagram from 'xstream/extra/fromDiagram'
* import throttle from 'xstream/extra/throttle'
*
* const stream = fromDiagram('--1-2-----3--4----5|')
* .compose(throttle(60))
*
* stream.addListener({
* next: i => console.log(i),
* error: err => console.error(err),
* complete: () => console.log('completed')
* })
* ```
*
* ```text
* > 1
* > 3
* > 5
* > completed
* ```
*
* @param {number} period The amount of silence required in milliseconds.
* @return {Stream}
*/
export default function throttle<T>(period: number): (ins: Stream<T>) => Stream<T>;
Выполнить команду
Для локальной разработки. Не используйте в интернете!