1

Given the following class

class A {
  name: string;
  age: number;

  doSomething() {}
  doSomethingElse() {}
}

I would like to get a type of only the properties of class A, like

type PropertiesFromClass = {
  name: string;
  age: number;
}

Is it possible?

Nullndr
  • 1,624
  • 1
  • 6
  • 24

0 Answers0