Interface IPollingOptions

轮询选项。

interface IPollingOptions {
    breakOnError?: boolean;
    interval?: number;
    shouldContinue?: (() => boolean);
}

Properties

breakOnError?: boolean

出错时是否中断,默认为 false。

interval?: number

轮询间隔(毫秒),默认为 1000 毫秒。

shouldContinue?: (() => boolean)

判断是否继续执行轮询操作的函数,返回值为 false 时停止轮询。