sinclairzx81 / typebox

Json Schema Type Builder with Static Type Resolution for TypeScript
Other
4.65k stars 150 forks source link

Revision 0.32.24 #848

Closed sinclairzx81 closed 3 months ago

sinclairzx81 commented 3 months ago

This PR implements a small optimization on Value.Convert. It changes the Object property conversion to avoid reducing on properties, instead opting to populate in empty object (avoiding recurrent object initialization)

In future, additional optimizations may be possible by changing Convert from a immutable function to mutable (will need to be on the next minor revision as this would technically a breaking change)