🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@types/react-is-deprecated

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/react-is-deprecated

TypeScript definitions for react-is-deprecated

ts4.7
ts4.8
ts4.9
ts5.0
ts5.1
ts5.2
ts5.3
ts5.4
ts5.5
ts5.6
ts5.7
ts5.8
ts5.9
ts6.0
latest
Source
npmnpm
Version
0.1.14
Version published
Weekly downloads
10
-16.67%
Maintainers
1
Weekly downloads
 
Created
Source

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.

index.d.ts

declare module "react-is-deprecated" {
    import type * as PropTypes from "prop-types";

    interface PropTypesValidators {
        any: typeof PropTypes.any;
        array: typeof PropTypes.array;
        bool: typeof PropTypes.bool;
        func: typeof PropTypes.func;
        number: typeof PropTypes.number;
        object: typeof PropTypes.object;
        string: typeof PropTypes.string;
        node: typeof PropTypes.node;
        element: typeof PropTypes.element;
        instanceOf: typeof PropTypes.instanceOf;
        oneOf: typeof PropTypes.oneOf;
        oneOfType: typeof PropTypes.oneOfType;
        arrayOf: typeof PropTypes.arrayOf;
        objectOf: typeof PropTypes.objectOf;
        shape: typeof PropTypes.shape;
        exact: typeof PropTypes.exact;
    }

    export function deprecate<T>(validator: PropTypes.Validator<T>, message: string): PropTypes.Validator<T>;

    interface Deprecatable<T> {
        isDeprecated: (message: string) => PropTypes.Validator<T>;
    }

    // Unfortunately this copy-paste must happen -- I can't just take PropTypes and programmatically
    // define a version that intersects in the Deprecatable interface into the keys.
    interface DeprecatablePropTypes {
        any: PropTypes.Requireable<any> & Deprecatable<any>;
        array: PropTypes.Requireable<any> & Deprecatable<any>;
        bool: PropTypes.Requireable<any> & Deprecatable<any>;
        func: PropTypes.Requireable<any> & Deprecatable<any>;
        number: PropTypes.Requireable<any> & Deprecatable<any>;
        object: PropTypes.Requireable<any> & Deprecatable<any>;
        string: PropTypes.Requireable<any> & Deprecatable<any>;
        node: PropTypes.Requireable<any> & Deprecatable<any>;
        element: PropTypes.Requireable<any> & Deprecatable<any>;
        instanceOf(expectedClass: {}): PropTypes.Requireable<any> & Deprecatable<any>;
        oneOf(types: any[]): PropTypes.Requireable<any> & Deprecatable<any>;
        oneOfType(types: Array<PropTypes.Validator<any>>): PropTypes.Requireable<any> & Deprecatable<any>;
        arrayOf(type: PropTypes.Validator<any>): PropTypes.Requireable<any> & Deprecatable<any>;
        objectOf(type: PropTypes.Validator<any>): PropTypes.Requireable<any> & Deprecatable<any>;
        shape(type: PropTypes.ValidationMap<any>): PropTypes.Requireable<any> & Deprecatable<any>;
    }

    export function addIsDeprecated(propTypes: PropTypesValidators): DeprecatablePropTypes;
}

Additional Details

  • Last updated: Fri, 22 Mar 2024 20:06:54 GMT
  • Dependencies: @types/prop-types

Credits

These definitions were written by Sean Kelley.

FAQs

Package last updated on 22 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts