MOBILE-3947 types: Add types to TemplateRef

main
Dani Palou 2024-01-10 13:11:48 +01:00
parent 4397446acd
commit 350f5792ca
3 changed files with 4 additions and 4 deletions

View File

@ -47,8 +47,8 @@ export class CoreSitesListComponent<T extends CoreSiteBasicInfo> {
@Input() currentSiteClickable?: boolean; // If set, specify a different clickable value for current site.
@Output() onSiteClicked = new EventEmitter<T>();
@ContentChild('siteItem') siteItemTemplate?: TemplateRef<unknown>;
@ContentChild('siteLabel') siteLabelTemplate?: TemplateRef<unknown>;
@ContentChild('siteItem') siteItemTemplate?: TemplateRef<{site: T; isCurrentSite: boolean}>;
@ContentChild('siteLabel') siteLabelTemplate?: TemplateRef<{site: T; isCurrentSite: boolean}>;
/**
* Check whether a site is clickable.

View File

@ -67,7 +67,7 @@ export class CoreSwipeSlidesComponent<Item = unknown> implements OnChanges, OnDe
}, 0);
}
@ContentChild(TemplateRef) template?: TemplateRef<unknown>; // Template defined by the content.
@ContentChild(TemplateRef) template?: TemplateRef<{item: Item; active: boolean}>; // Template defined by the content.
protected hostElement: HTMLElement;
protected unsubscribe?: () => void;

View File

@ -68,7 +68,7 @@ export class CoreTabComponent implements OnInit, OnDestroy, CoreTabBase {
@Input() id = ''; // An ID to identify the tab.
@Output() ionSelect: EventEmitter<CoreTabComponent> = new EventEmitter<CoreTabComponent>();
@ContentChild(TemplateRef) template?: TemplateRef<unknown>; // Template defined by the content.
@ContentChild(TemplateRef) template?: TemplateRef<void>; // Template defined by the content.
element: HTMLElement; // The core-tab element.
loaded = false;