Description
What is the problem this feature would solve?
The current type system extends TypeBox but is embedded within the main Elysia package. This forces developers to include the entire Elysia package when they only need the type system functionality in their shared libraries.
What is the feature you are proposing to solve the problem?
Create a separate npm package for the TypeBox extensions currently in src/type-system.ts. This new package would become a dependency of Elysia, allowing developers to use these type extensions independently in their shared libraries without pulling in the full Elysia framework.
Added Benefits:
Reduced bundle size for projects only needing type definitions
Easier maintenance and versioning of type system
Better separation of concerns
Simplified dependency management for shared libraries
What alternatives have you considered?
We initially attempted to use Pure TypeBox in our shared libraries, but Elysia's specific needs and type DSL made this impractical. Currently, teams need to either copy or replicate Elysia's TypeBox implementation to maintain compatibility, which isn't maintainable long-term.