Closed dgreene1 closed 2 years ago
Hi @dgreene1, feel free to open a PR that rewrites the library in TypeScript. I'm open to PRs for fixes/improvements, although I'm not currently interested in further development of the library on my own time.
Thank you for the info @lissitz. Just in case our company (who is doing major accessibility work) agrees to allocating people’s time, I want to check to see if you’d be willing to accept me being added as a maintainer so I can assist/control the publishing/releases so that a11y and security patches can be released in a timely manner?
You could keep the library in your namespace/org since that’s a pain. This would be just an offer to have a 2nd maintainer who might have budget during work hours (still waiting to hear back from our engineering budget people at the company).
Yes, I'm open to eventually adding you as a maintainer 🙂.
@lissitz our company has allocated funding for us to do the rewrite in the next couple of weeks. We have a question though: Do you want to preserve the runtime validation that prop-types was accomplishing? Or is the compile time validation of TypeScript enough?
It’s possible to have both, but removing runtime validation would decrease the bundle size and would remove the runtime lag that comes with checking the input.
If you say “both please” we will be using either https://github.com/gcanti/prop-types-ts or https://github.com/colinhacks/zod. I prefer zod since it has a smaller footprint than prop-types-ts. But my preference would be to use Typescript alone without any runtime validation.
Hi @lissitz. I noticed that there are no typescript types for this library in DefinitelyTyped and the library itself does not export any type information.
I'm one of those people who loves converting JS libraries to TypeScript.
Would you be interested in either:
Option 2 is significantly easier for me and is more accurate from consumers since it doesn't allow the type definitions to drift away from the runtime types since they would be derived from the same source.