K
K
Konstantin2018-10-19 18:55:13
JavaScript
Konstantin, 2018-10-19 18:55:13

How to get the type of an object as a string in JavaScript/TypeScript?

There is this script:

interface IFilterEducationPlanClass {
}

 public constructor(model: IFilterEducationPlanClass) {
    console.log(model);
  }

As you can see, the input is an object of type IFilterEducationPlanClass.
How can I get its type name as a string: IFilterEducationPlanClass?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question