3.0.4 • Published 7 months ago
@types/ft-poller v3.0.4
Installation
npm install --save @types/ft-poller
Summary
This package contains type definitions for ft-poller (https://github.com/Financial-Times/ft-poller#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ft-poller.
index.d.ts
// Type definitions for ft-poller 3.0
// Project: https://github.com/Financial-Times/ft-poller#readme
// Definitions by: Alex Kondov <https://github.com/AlexKondov>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
interface Options {
[key: string]: any;
}
interface Config<PollerData, ExternalData> {
url: string;
defaultData?: PollerData | undefined;
options?: Options | undefined;
refreshInterval?: number | undefined;
autostart?: boolean | undefined;
parseData?: ((data: ExternalData) => PollerData) | undefined;
}
declare class Poller<PollerData, ExternalData = any> {
constructor(config: Config<PollerData, ExternalData>);
start(options?: Options): Promise<PollerData>;
stop(): boolean;
retry(): void;
fetch(): void;
getData(): PollerData;
isRunning(): boolean;
}
export = Poller;
Additional Details
- Last updated: Thu, 08 Jul 2021 22:41:04 GMT
- Dependencies: none
- Global values: none
Credits
These definitions were written by Alex Kondov.