is it possible to get all the public variable's name of interface or class?
He is the interface that I am using:
export interface PeriodicElement {
name: object;
position: number;
weight: number;
symbol: string;
}
Expected output is: name, position, weight, symbol.
I can define one array which has all variable name, but I am curious to know if we have anything like fetching variable names.
Update
Just checked the other possible duplicate link. But the solution suggests to create new instance of class, I don't want to do that. I want to have the variable name of interface without any instantiation.