Answer the question
In order to leave comments, you need to log in
How to get an array of interface field names?
Is there any analogue of Object.keys()? To work without creating a specific object, but from a pure interface.
Answer the question
In order to leave comments, you need to log in
Your output is enum
. An interface is a fairly virtual entity that exists only up to the compilation level. There are no interfaces in the runtime, which means there is nowhere to bypass the fields.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question