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

1.1.6 • Public • Published

Installation

npm install --save @types/react-timeout

Summary

This package contains type definitions for react-timeout (https://github.com/plougsgaard/react-timeout).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-timeout.

index.d.ts

/// <reference types="node" />

import * as React from "react";

export = ReactTimeout;

declare function ReactTimeout<T>(
    SourceComponent: React.ComponentClass<T> | React.FunctionComponent<T>,
): React.ComponentClass<T>;

declare namespace ReactTimeout {
    type Timer = NodeJS.Timer | number;

    type Id = number;

    interface ReactTimeoutProps {
        setTimeout?: ((callback: (...args: any[]) => void, ms: number, ...args: any[]) => Timer) | undefined;
        clearTimeout?: ((timer: Timer) => void) | undefined;
        setInterval?: ((callback: (...args: any[]) => void, ms: number, ...args: any[]) => Id) | undefined;
        clearInterval?: ((id: Id) => void) | undefined;
        setImmediate?: ((callback: (...args: any[]) => void, ...args: any[]) => Id) | undefined;
        clearImmediate?: ((id: Id) => void) | undefined;
        requestAnimationFrame?: ((callback: (...args: any[]) => void) => Id) | undefined;
        cancelAnimationFrame?: ((id: Id) => void) | undefined;
    }
}

Additional Details

Credits

These definitions were written by Kerwyn Rojas.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/react-timeout

Weekly Downloads

1,708

Version

1.1.6

License

MIT

Unpacked Size

4.75 kB

Total Files

5

Last publish

Collaborators

  • types