I keep encountering the Type
keyword in various parts of the documentation. For instance, in this link, it mentions that the ComponentRef
has a property called componentType
which is of type Type<any>
. Upon further investigation, I stumbled upon this information about it on the docs, stating: Invoke as ES7 decorator.
Additionally, by checking out the source code on GitHub, I found these comments:
/**
* @whatItDoes Represents a type that a Component or other object is instances of.
*
* @description
*
* An example of a `Type` is `MyCustomComponent` class, which in JavaScript is be represented by
* the `MyCustomComponent` constructor function.
Despite all this information, I'm still unsure about the exact purpose of the Type
keyword. Is there something fundamental that I am overlooking?