facebook / prop-types

Runtime type checking for React props and similar objects
MIT License
4.48k stars 356 forks source link

Validation of .shape() and Typescript failure #296

Closed Borales closed 4 years ago

Borales commented 4 years ago

I have a problem with prop-types when working with TypeScript.

Screenshot 2019-10-29 at 12 44 44

Here's an example - https://codesandbox.io/s/prop-types-ts-validation-failure-f1h4n


Not really sure if it relates to #293 somehow.

ljharb commented 4 years ago

This seems related to your InferProps type more than anything else; this repo has no TS or types.

Borales commented 4 years ago

@ljharb sorry, my bad (wrong repo)