lujakob/nestjs-realworld-example-app

Why is ValidationPipe decorated with `@Injectable` if it is never injected?

timbo-tj opened this issue · 1 comments

Is this necessary? I am new to NestJs so am scrutinising every bit of example code, and I couldn't figure out why ValidationPipe was decorated with @Injectable

After using NestJS for a little while, I don't think there is a reason for it outside of convention or the cli code generator automatically decorating the generated class. There also doesn't seem to be any harm in having it there if in the future you decide to inject it into something.