Extraction of Sub-Validation Functions from Composite Typia Validation Functions #926
Labels
good first issue
Good for newcomers
help wanted
Extra attention is needed
question
Further information is requested
Feature Request
A description of the problem you're trying to solve:
Currently, in Typia, when validating a composite object (like an object that conforms to an interface consisting of multiple nested interfaces), there is no way to extract or destructure individual validation functions for the nested interfaces.
An overview of the suggested solution:
The proposed solution is to enhance Typia to allow for the extraction or destruction of individual validation functions from a transpiled function created for a composite interface. This feature would enable developers to extract the validation functions for the nested interfaces and use them independently, leading to more modular and efficient code.
Examples of how the suggestion would work in various places:
Code examples showing the expected behavior:
In this example,
isEmployee
andisProduct
are extracted fromisEmployeeProductAssignment
. These individual functions can be used to validateEmployee
andProduct
objects separately, enhancing the modularity and efficiency.The text was updated successfully, but these errors were encountered: