jquense / yup

Dead simple Object schema validation
MIT License
22.72k stars 925 forks source link

Types and code not in sync #2223

Closed sebakerckhof closed 2 months ago

sebakerckhof commented 2 months ago

The types of the package does not seem to match the code. E.g. the index.d.ts file exports the Reference type, but the index.esm.js file does not export Reference. Thus in your editor you can do: import { Reference } from 'yup' and all looks fine, but then when running the actual code Reference will be undefined...

jquense commented 2 months ago

They aren't out of sync, those are exported types. E.g. Reference is just a type, you can't use it at runtime