0

Let's say i have a class like this:

export class Test{
  public prop: string;
}

and at the start, I call

const obj = new Test(); 

is there any way that I can see what properties I have on the Test model without assigning the properties, I tried this but it does not work

console.log(obj.hasOwnProperty('prop')) 

0 Answers0