Custom param decorators accept pipes as arguments. NestJS passes the decorator's resolved value through the pipe before injecting it into the handler. This lets you extract a value from the request and validate or transform it in a single decorator call.
Pass a pipe instance as an argument to the custom decorator: @TenantId(new MyPipe()).
NestJS resolves the decorator value first, then passes it through the pipe.
The pipe can be async — NestJS awaits it before injecting the final value.
Multiple pipes can be chained: @TenantId(new ParsePipe(), new ValidatePipe()).
The pipe receives the raw decorator output — design both to work together.