Installation
npm install --save @types/react-is-deprecated
Summary
This package contains type definitions for react-is-deprecated (https://github.com/Aweary/react-is-deprecated).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-is-deprecated.
declare module "react-is-deprecated" {
import { ReactPropTypes, Requireable, ValidationMap, Validator } from "react";
export function deprecate<T>(validator: Validator<T>, message: string): Validator<T>;
interface Deprecatable<T> {
isDeprecated: (message: string) => Validator<T>;
}
interface DeprecatablePropTypes {
any: Requireable<any> & Deprecatable<any>;
array: Requireable<any> & Deprecatable<any>;
bool: Requireable<any> & Deprecatable<any>;
func: Requireable<any> & Deprecatable<any>;
number: Requireable<any> & Deprecatable<any>;
object: Requireable<any> & Deprecatable<any>;
string: Requireable<any> & Deprecatable<any>;
node: Requireable<any> & Deprecatable<any>;
element: Requireable<any> & Deprecatable<any>;
instanceOf(expectedClass: {}): Requireable<any> & Deprecatable<any>;
oneOf(types: any[]): Requireable<any> & Deprecatable<any>;
oneOfType(types: Validator<any>[]): Requireable<any> & Deprecatable<any>;
arrayOf(type: Validator<any>): Requireable<any> & Deprecatable<any>;
objectOf(type: Validator<any>): Requireable<any> & Deprecatable<any>;
shape(type: ValidationMap<any>): Requireable<any> & Deprecatable<any>;
}
export function addIsDeprecated(propTypes: ReactPropTypes): DeprecatablePropTypes;
}
Additional Details
- Last updated: Wed, 18 Oct 2023 11:45:05 GMT
- Dependencies: @types/react
Credits
These definitions were written by Sean Kelley.