A package to dynamically create pickers based on TypeScript interfaces.
About this project
ts-runtime-picker ts-runtime-picker 🚀 is a TypeScript-first utility package designed to dynamically transform your code and provide runtime-safe "pickers" for your objects based on TypeScript interfaces or types. The package integrates seamlessly into your Vite-based or Webpack-based projects, allowing developers to enjoy type-safe runtime logic without sacrificing development speed or flexibility. 🛠️ Problem and Solution 🐛 The Problem When working with JavaScript or TypeScript, developers often pass objects directly into functions, APIs, or databases (like Firebase). This can lead to unnecessary or unwanted properties being included. For example: In this example, only firstName, lastName, email, and password might be relevant for the operation, but extraField and anotherExtraField are also sent, which could cause inefficiencies, validation errors, or unexpected behavior. Even if you explicitly type request.data as User in TypeScript, the extra fields (extraField and anotherExtraField) still exist at runtime. TypeScript enforces types only at compile time, meaning that any additional or unwanted properties are not automatically removed:
From the project README on
GitHub
Add this badge to your README
Show that your project is listed on Made in Algeria.
[](https://www.madeinalgeria.dev/projects/ts-runtime-picker)