prop-types/000755 001751 000166 0000000000 15021636731014665 5ustar00runner000000 000000 1502163673115021636731prop-types/LICENSE000644 001751 000166 0000002165 15021636731015676 0ustar00runner000000 000000 1502163673115021636731 MIT License Copyright (c) Microsoft Corporation. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE prop-types/README.md000644 001751 000166 0000001122 15021636731016140 0ustar00runner000000 000000 1502163673115021636731# Installation > `npm install --save @types/prop-types` # Summary This package contains type definitions for prop-types (https://github.com/facebook/prop-types). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/prop-types. ### Additional Details * Last updated: Mon, 09 Jun 2025 20:02:33 GMT * Dependencies: none # Credits These definitions were written by [DovydasNavickas](https://github.com/DovydasNavickas), [Ferdy Budhidharma](https://github.com/ferdaber), and [Sebastian Silbermann](https://github.com/eps1lon). prop-types/index.d.ts000644 001751 000166 0000010661 15021636731016572 0ustar00runner000000 000000 1502163673115021636731// eslint-disable-next-line @definitelytyped/export-just-namespace export = PropTypes; declare namespace PropTypes { type ReactComponentLike = | string | ((props: any) => any) | (new(props: any, context: any) => any); interface ReactElementLike { type: ReactComponentLike; props: unknown; key: string | null; } interface ReactNodeArray extends Iterable {} /** * @internal Use `Awaited` instead */ // Helper type to enable `Awaited`. // Must be a copy of the non-thenables of `ReactNodeLike`. type AwaitedReactNodeLike = | ReactElementLike | string | number | bigint | ReactNodeArray | boolean | null | undefined; type ReactNodeLike = | ReactElementLike | ReactNodeArray | string | number | bigint | boolean | null | undefined | Promise; const nominalTypeHack: unique symbol; type IsOptional = undefined extends T ? true : false; type RequiredKeys = { [K in keyof V]-?: Exclude extends Validator ? IsOptional extends true ? never : K : never; }[keyof V]; type OptionalKeys = Exclude>; type InferPropsInner = { [K in keyof V]-?: InferType }; interface Validator { ( props: { [key: string]: any }, propName: string, componentName: string, location: string, propFullName: string, ): Error | null; [nominalTypeHack]?: { type: T; } | undefined; } interface Requireable extends Validator { isRequired: Validator>; } type ValidationMap = { [K in keyof T]?: Validator }; /** * Like {@link ValidationMap} but treats `undefined`, `null` and optional properties the same. * This type is only added as a migration path in React 19 where this type was removed from React. * Runtime and compile time types would mismatch since you could see `undefined` at runtime when your types don't expect this type. */ type WeakValidationMap = { [K in keyof T]?: null extends T[K] ? Validator : undefined extends T[K] ? Validator : Validator; }; type InferType = V extends Validator ? T : any; type InferProps = & InferPropsInner>> & Partial>>>; const any: Requireable; const array: Requireable; const bool: Requireable; const func: Requireable<(...args: any[]) => any>; const number: Requireable; const object: Requireable; const string: Requireable; const node: Requireable; const element: Requireable; const symbol: Requireable; const elementType: Requireable; function instanceOf(expectedClass: new(...args: any[]) => T): Requireable; function oneOf(types: readonly T[]): Requireable; function oneOfType>(types: T[]): Requireable>>; function arrayOf(type: Validator): Requireable; function objectOf(type: Validator): Requireable<{ [K in keyof any]: T }>; function shape

>(type: P): Requireable>; function exact

>(type: P): Requireable>>; /** * Assert that the values match with the type specs. * Error messages are memorized and will only be shown once. * * @param typeSpecs Map of name to a ReactPropType * @param values Runtime values that need to be type-checked * @param location e.g. "prop", "context", "child context" * @param componentName Name of the component for error messages * @param getStack Returns the component stack */ function checkPropTypes( typeSpecs: any, values: any, location: string, componentName: string, getStack?: () => any, ): void; /** * Only available if NODE_ENV=production */ function resetWarningCache(): void; } prop-types/package.json000644 001751 000166 0000002200 15021636731017145 0ustar00runner000000 000000 1502163673115021636731{ "name": "@types/prop-types", "version": "15.7.15", "description": "TypeScript definitions for prop-types", "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/prop-types", "license": "MIT", "contributors": [ { "name": "DovydasNavickas", "githubUsername": "DovydasNavickas", "url": "https://github.com/DovydasNavickas" }, { "name": "Ferdy Budhidharma", "githubUsername": "ferdaber", "url": "https://github.com/ferdaber" }, { "name": "Sebastian Silbermann", "githubUsername": "eps1lon", "url": "https://github.com/eps1lon" } ], "main": "", "types": "index.d.ts", "repository": { "type": "git", "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", "directory": "types/prop-types" }, "scripts": {}, "dependencies": {}, "peerDependencies": {}, "typesPublisherContentHash": "92a20bc6f48f988ae6f314daa592e457e4b7ccb6ef115535bf69c7061375a248", "typeScriptVersion": "5.1" }