Socket
Socket
Sign inDemoInstall

@types/prop-types

Package Overview
Dependencies
0
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 15.7.6 to 15.7.7

29

prop-types/index.d.ts

@@ -12,3 +12,3 @@ // Type definitions for prop-types 15.7

| ((props: any, context?: any) => any)
| (new (props: any, context?: any) => any);
| (new(props: any, context?: any) => any);

@@ -36,8 +36,17 @@ export interface ReactElementLike {

export type RequiredKeys<V> = { [K in keyof V]-?: Exclude<V[K], undefined> extends Validator<infer T> ? IsOptional<T> extends true ? never : K : never }[keyof V];
export type RequiredKeys<V> = {
[K in keyof V]-?: Exclude<V[K], undefined> extends Validator<infer T> ? IsOptional<T> extends true ? never : K
: never;
}[keyof V];
export type OptionalKeys<V> = Exclude<keyof V, RequiredKeys<V>>;
export type InferPropsInner<V> = { [K in keyof V]-?: InferType<V[K]>; };
export type InferPropsInner<V> = { [K in keyof V]-?: InferType<V[K]> };
export interface Validator<T> {
(props: { [key: string]: any }, propName: string, componentName: string, location: string, propFullName: string): Error | null;
(
props: { [key: string]: any },
propName: string,
componentName: string,
location: string,
propFullName: string,
): Error | null;
[nominalTypeHack]?: {

@@ -70,7 +79,7 @@ type: T;

export const elementType: Requireable<ReactComponentLike>;
export function instanceOf<T>(expectedClass: new (...args: any[]) => T): Requireable<T>;
export function instanceOf<T>(expectedClass: new(...args: any[]) => T): Requireable<T>;
export function oneOf<T>(types: ReadonlyArray<T>): Requireable<T>;
export function oneOfType<T extends Validator<any>>(types: T[]): Requireable<NonNullable<InferType<T>>>;
export function arrayOf<T>(type: Validator<T>): Requireable<T[]>;
export function objectOf<T>(type: Validator<T>): Requireable<{ [K in keyof any]: T; }>;
export function objectOf<T>(type: Validator<T>): Requireable<{ [K in keyof any]: T }>;
export function shape<P extends ValidationMap<any>>(type: P): Requireable<InferProps<P>>;

@@ -89,3 +98,9 @@ export function exact<P extends ValidationMap<any>>(type: P): Requireable<Required<InferProps<P>>>;

*/
export function checkPropTypes(typeSpecs: any, values: any, location: string, componentName: string, getStack?: () => any): void;
export function checkPropTypes(
typeSpecs: any,
values: any,
location: string,
componentName: string,
getStack?: () => any,
): void;

@@ -92,0 +107,0 @@ /**

{
"name": "@types/prop-types",
"version": "15.7.6",
"version": "15.7.7",
"description": "TypeScript definitions for prop-types",

@@ -33,4 +33,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/prop-types",

"dependencies": {},
"typesPublisherContentHash": "a362946a2f901a189dd7880673120118c642c90b73913b6fe2e82f832c7a29b9",
"typesPublisherContentHash": "71d984613ea41ec00fb24493579ad34fe1a20779ecc142ce4b9dcfcc63445cdb",
"typeScriptVersion": "4.5"
}

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Mon, 18 Sep 2023 17:06:29 GMT
* Last updated: Sun, 24 Sep 2023 06:37:28 GMT
* Dependencies: none

@@ -14,0 +14,0 @@ * Global values: none

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc