Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

328
Views
How can I expose all properties in an entity using @Expose decorator from class-transformer?

I used class-transformer lib to my proyect implemented on NodeJS, but i did not find a way to expose all my properties of my entity, I try using de @Expose() decrator at class level, but it does not work,I hope find similar solution because is a little exhausting del expose decorator one by one property in my entity. example of what I desire:

@Expose()
export class User{
   name:string;
   phone:string;
   age:number
};

by currently it just work if:

export class User{
   @Expose()  name:string;
   @Expose()  phone:string;
   @Expose()  age:number
};
over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!