[Reporting] Remove any
from public/poller (#110539)
* [Reporting] Remove `any` from public/poller * remove unnecessary comment
This commit is contained in:
parent
f8c80a7422
commit
bbfad19051
|
@ -8,20 +8,19 @@
|
|||
import _ from 'lodash';
|
||||
|
||||
interface PollerOptions {
|
||||
functionToPoll: () => Promise<any>;
|
||||
functionToPoll: () => Promise<void>;
|
||||
pollFrequencyInMillis: number;
|
||||
trailing?: boolean;
|
||||
continuePollingOnError?: boolean;
|
||||
pollFrequencyErrorMultiplier?: number;
|
||||
successFunction?: (...args: any) => any;
|
||||
errorFunction?: (error: Error) => any;
|
||||
successFunction?: (...args: unknown[]) => void;
|
||||
errorFunction?: (error: Error) => void;
|
||||
}
|
||||
|
||||
// @TODO Maybe move to observables someday
|
||||
export class Poller {
|
||||
private readonly functionToPoll: () => Promise<any>;
|
||||
private readonly successFunction: (...args: any) => any;
|
||||
private readonly errorFunction: (error: Error) => any;
|
||||
private readonly functionToPoll: () => Promise<void>;
|
||||
private readonly successFunction: (...args: unknown[]) => void;
|
||||
private readonly errorFunction: (error: Error) => void;
|
||||
private _isRunning: boolean;
|
||||
private _timeoutId: NodeJS.Timeout | null;
|
||||
private pollFrequencyInMillis: number;
|
||||
|
|
Loading…
Reference in a new issue