🎩 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.5
ts4.6
Source
npmnpm
Version
0.1.13
Version published
Weekly downloads
9
-18.18%
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 { 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>;
    }

    // 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: 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: Array<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: Mon, 20 Nov 2023 23:36:24 GMT
  • Dependencies: @types/react

Credits

These definitions were written by Sean Kelley.

FAQs

Package last updated on 21 Nov 2023

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