Skip to content

Commit

Permalink
Fixing types
Browse files Browse the repository at this point in the history
  • Loading branch information
florian-glombik committed Aug 12, 2024
1 parent 7998251 commit 431b01f
Showing 1 changed file with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,21 @@ export class ExerciseDetailDirective implements OnInit, OnDestroy {
}
this.detail = this.detail as ShownDetail;

const detailTypeToComponent: { [key in DetailType]?: Type<TextDetailComponent | DateDetailComponent | LinkDetailComponent | BooleanDetailComponent> } = {
const detailTypeToComponent: {
[key in DetailType]?: Type<
| TextDetailComponent
| DateDetailComponent
| LinkDetailComponent
| BooleanDetailComponent
| ProgrammingRepositoryButtonsDetailComponent
| ProgrammingAuxiliaryRepositoryButtonsDetailComponent
>;
} = {
[DetailType.Text]: TextDetailComponent,
[DetailType.Date]: DateDetailComponent,
[DetailType.Link]: LinkDetailComponent,
[DetailType.Boolean]: BooleanDetailComponent,
const detailTypeToComponent: { [key in DetailType]?: Type<TextDetailComponent | DateDetailComponent | LinkDetailComponent | BooleanDetailComponent | ProgrammingRepositoryButtonsDetailComponent | ProgrammingAuxiliaryRepositoryButtonsDetailComponent> } = {
[DetailType.ProgrammingRepositoryButtons]: ProgrammingRepositoryButtonsDetailComponent,
[DetailType.ProgrammingRepositoryButtons]: ProgrammingRepositoryButtonsDetailComponent,
[DetailType.ProgrammingAuxiliaryRepositoryButtons]: ProgrammingAuxiliaryRepositoryButtonsDetailComponent,
};

Expand Down

0 comments on commit 431b01f

Please sign in to comment.