🎩 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

Source
npmnpm
Version
0.1.10
Version published
Weekly downloads
13
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

// Type definitions for react-is-deprecated v0.1.2
// Project: https://github.com/Aweary/react-is-deprecated
// Definitions by: Sean Kelley <https://github.com/seansfkelley>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8

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: 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, 27 Sep 2023 07:12:04 GMT
  • Dependencies: @types/react
  • Global values: none

Credits

These definitions were written by Sean Kelley.

FAQs

Package last updated on 27 Sep 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