(Also doable without a compiler step, but since it's TS one more compiler step isn't the end of the world: https://docs.nestjs.com/techniques/validation#auto-validatio...)
You can simply type a class variable as an int while the validation decorator works on a completely different type. It's an illusion of type safety.
(Also doable without a compiler step, but since it's TS one more compiler step isn't the end of the world: https://docs.nestjs.com/techniques/validation#auto-validatio...)