@types/ft-poller
TypeScript icon, indicating that this package has built-in type declarations

3.0.4 • Public • Published

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

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: Tue, 07 Nov 2023 03:09:37 GMT
  • Dependencies: none

Credits

These definitions were written by Alex Kondov.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/ft-poller

Weekly Downloads

5

Version

3.0.4

License

MIT

Unpacked Size

3.81 kB

Total Files

5

Last publish

Collaborators

  • types