Typescript - How to get all class properties with decorators from a class decorator

Viewed 426

I want to have a class decorator that gets a list of all properties with a certain decorator and then modify the class to add some additional properties. For example:

@CheckForPropertyThings
export class FoorBar {
  @PropertyThing hello: string;
}

In this example, I want to check the class for all properties with the PropertyThing decorator and then modify the class to add certain properties. Is this possible to do?

0 Answers
Related