Type of angular components

Ebuall picture Ebuall · Aug 22, 2017 · Viewed 10.6k times · Source

Can I refer to angular component class as a type? I see Ionic uses any for components. Is it possible in Typescript to declare an argument type, that expects only component classes?

I saw this question, but components don't have anything in common in constructors: Passing class as parameter causes "is not newable" error

Answer

Ebuall picture Ebuall · Sep 26, 2018

As it turns out this is not possible in TypeScript right now. Decorators cannot change type of a class, that means they are invisible for a type system.
More info can be found here: