Please check out this code
class A<T = any> {
@ApiProperty({ example: 'Success' })
message: string;
@ApiProperty({})
data: T;
}
export const SwaggerEssentials = <T>(okRes?: apiOkResponse) => {
return applyDecorators(
ApiResponse({ type: A<T>, status: 200 }), // The error is popping up here
);
};
The error is popping up when I try to use T
with A
generic value.