mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
chore(many): replace any types and add tech debt tickets (#26293)
Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
This commit is contained in:
@@ -29,8 +29,8 @@ import {
|
||||
})
|
||||
export class Header implements ComponentInterface {
|
||||
private scrollEl?: HTMLElement;
|
||||
private contentScrollCallback?: any;
|
||||
private intersectionObserver?: any;
|
||||
private contentScrollCallback?: () => void;
|
||||
private intersectionObserver?: IntersectionObserver;
|
||||
private collapsibleMainHeader?: HTMLElement;
|
||||
private inheritedAttributes: Attributes = {};
|
||||
|
||||
@@ -153,9 +153,9 @@ export class Header implements ComponentInterface {
|
||||
this.scrollEl = await getScrollElement(contentEl);
|
||||
|
||||
const headers = pageEl.querySelectorAll('ion-header');
|
||||
this.collapsibleMainHeader = Array.from(headers).find((header: any) => header.collapse !== 'condense') as
|
||||
| HTMLElement
|
||||
| undefined;
|
||||
this.collapsibleMainHeader = Array.from(headers).find(
|
||||
(header: HTMLIonHeaderElement) => header.collapse !== 'condense'
|
||||
) as HTMLElement | undefined;
|
||||
|
||||
if (!this.collapsibleMainHeader) {
|
||||
return;
|
||||
@@ -177,7 +177,7 @@ export class Header implements ComponentInterface {
|
||||
* as well as progressively showing/hiding the main header
|
||||
* border as the top-most toolbar collapses or expands.
|
||||
*/
|
||||
const toolbarIntersection = (ev: any) => {
|
||||
const toolbarIntersection = (ev: IntersectionObserverEntry[]) => {
|
||||
handleToolbarIntersection(ev, mainHeaderIndex, scrollHeaderIndex, this.scrollEl!);
|
||||
};
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ export const createHeaderIndex = (headerEl: HTMLElement | undefined): HeaderInde
|
||||
|
||||
return {
|
||||
el: headerEl,
|
||||
toolbars: Array.from(toolbars).map((toolbar: any) => {
|
||||
toolbars: Array.from(toolbars).map((toolbar: HTMLIonToolbarElement) => {
|
||||
const ionTitleEl = toolbar.querySelector('ion-title');
|
||||
return {
|
||||
el: toolbar,
|
||||
@@ -86,7 +86,11 @@ export const setToolbarBackgroundOpacity = (headerEl: HTMLIonHeaderElement, opac
|
||||
}
|
||||
};
|
||||
|
||||
const handleToolbarBorderIntersection = (ev: any, mainHeaderIndex: HeaderIndex, scrollTop: number) => {
|
||||
const handleToolbarBorderIntersection = (
|
||||
ev: IntersectionObserverEntry[],
|
||||
mainHeaderIndex: HeaderIndex,
|
||||
scrollTop: number
|
||||
) => {
|
||||
if (!ev[0].isIntersecting) {
|
||||
return;
|
||||
}
|
||||
@@ -113,7 +117,7 @@ const handleToolbarBorderIntersection = (ev: any, mainHeaderIndex: HeaderIndex,
|
||||
* hide the primary toolbar content and show the scrollable toolbar content
|
||||
*/
|
||||
export const handleToolbarIntersection = (
|
||||
ev: any,
|
||||
ev: any, // TODO(FW-2832): type (IntersectionObserverEntry[] triggers errors which should be sorted)
|
||||
mainHeaderIndex: HeaderIndex,
|
||||
scrollHeaderIndex: HeaderIndex,
|
||||
scrollEl: HTMLElement
|
||||
|
||||
Reference in New Issue
Block a user