Having a background in imperative programming languages such as C++, Java, and C#, I am finding it difficult to grasp the concept of generics in Angular components. For instance, let's take a look at the Material datepicker-toggle component available in the Angular Components library. This component has a generic type argument. When I create an instance of this component using the following code:
<mat-form-field appearance="fill">
<input matInput [matDatepicker]="picker">
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
<mat-datepicker #picker></mat-datepicker>
</mat-form-field>
I am left wondering, what exactly is the type of D for the instantiated 'mat-datepicker-toggle' component? And how was this type captured?