ArgumentMetadata is the metadata object passed as the second parameter to PipeTransform.transform(). It describes the currently processed method argument with three properties:
type:'body' | 'query' | 'param' | 'custom'— indicates the parameter decorator usedmetatype: The runtime type of the argument (e.g.,String). Isundefinedif no type is declared or JavaScript is used. TypeScript interfaces produceObjectbecause they’re erased during transpilation.data: The string passed to the decorator (e.g.,@Body('name')gives'name'). Isundefinedif the decorator has empty parentheses.
The metatype field is critical for Pipes validation — it explains why DTO Classes vs Interfaces recommends classes over interfaces.