feature: Decorator-less support #2585
Labels
flag: needs discussion
Issues which needs discussion before implementation.
type: feature
Issues related to new features.
Description
I'm looking to run a project in Node.js' built-in TypeScript
--strip-types
support as of Node 23+.However, this requires us to set
experimentalDecorators
tofalse
, which causes my project utilizingclass-validator
to fail (understandably).Proposed solution
What if, without modifying any existing source code, we could enable the following decorator-less validation API:
Using the following source code addition:
I did some initial testing and it seems to work as expected, while enforcing the types match up between the
baseObj
andschema
.I know this is a radical idea, but it would help us migrate to a better TypeScript running behavior while allowing us to continue using
class-validator
The text was updated successfully, but these errors were encountered: