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
- Last updated: Tue, 07 Nov 2023 09:09:39 GMT
- Dependencies: @types/node, @types/react
Credits
These definitions were written by Kerwyn Rojas.