Skip to content

Commit

Permalink
Enable strict template checks (#2711)
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-drastrup authored and SigurdVilstrup committed Mar 21, 2023
1 parent fe5a421 commit b31185d
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 15 deletions.
3 changes: 2 additions & 1 deletion libs/designsystem/alert-experimental/src/alert.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { IconModule } from '@kirbydesign/designsystem/icon';
import { ThemeColorDirective } from '@kirbydesign/designsystem/shared';
import { EmptyStateModule } from '@kirbydesign/designsystem/empty-state';
import { ButtonComponent } from '@kirbydesign/designsystem/button';
import { ThemeColor } from '@kirbydesign/designsystem/helpers';

@Component({
standalone: true,
Expand Down Expand Up @@ -49,7 +50,7 @@ export class AlertExperimentalComponent implements AfterViewInit {
}

@Input() iconName: string;
@Input() iconThemeColor: string;
@Input() iconThemeColor: ThemeColor | `${ThemeColor}`;
@Input() okButton: string;
@Input() okButtonIsDestructive: boolean;
@Input() cancelButton: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class ListItemComponent implements OnInit, AfterViewInit {

@Input() item: any;

@Input() boundaryClass: BoundaryClass;
@Input() boundaryClass: BoundaryClass | BoundaryClass[];

@Input() swipeActions: ListSwipeAction[] = [];

Expand Down
3 changes: 2 additions & 1 deletion libs/designsystem/modal/src/modal/alert/alert.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
import { WindowRef } from '@kirbydesign/designsystem/types';
import { Observable, of } from 'rxjs';
import { IconModule } from '@kirbydesign/designsystem/icon';
import { ThemeColor } from '@kirbydesign/designsystem/helpers';
import { ThemeColorDirective } from '@kirbydesign/designsystem/shared';
import { EmptyStateModule } from '@kirbydesign/designsystem/empty-state';
import { ButtonComponent } from '@kirbydesign/designsystem/button';
Expand Down Expand Up @@ -49,7 +50,7 @@ export class AlertComponent implements AfterViewInit {
}

@Input() iconName: string;
@Input() iconThemeColor: string;
@Input() iconThemeColor: ThemeColor | `${ThemeColor}`;
@Input() okBtn: string;
@Input() okBtnIsDestructive: boolean;
@Input() cancelBtn: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
import { ThemeColor } from '@kirbydesign/core';

type BadgeIcon = {
name: string;
isCustom: boolean;
};

type BadgeText = {
text: string;
};

type ItemBadge = {
content: BadgeIcon | BadgeText;
content: {
name?: string;
isCustom?: boolean;
text?: string;
};
description?: string;
themeColor: ThemeColor;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class SegmentedControlComponent {
}

private _items: SegmentItemInternal[] = [];
get items(): SegmentItem[] {
get items(): SegmentItemInternal[] {
return this._items;
}

Expand Down
3 changes: 2 additions & 1 deletion libs/designsystem/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"annotateForClosureCompiler": true,
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"fullTemplateTypeCheck": true,
"strictTemplates": true,
"strictDomEventTypes": false,
"strictInjectionParameters": true,
"enableResourceInlining": true,
"inlineSourceMap": true,
Expand Down

0 comments on commit b31185d

Please sign in to comment.