@alauda-fe/common
Version:
Alauda frontend team common codes.
11 lines (10 loc) • 404 B
TypeScript
import { ElementRef } from '@angular/core';
/**
* To judge whether the parent element
*/
export declare const isSelfOrParent: (element: HTMLElement, target: HTMLElement) => boolean;
/**
* Coerces an ElementRef or an Element into an element.
* Useful for APIs that can accept either a ref or the native element itself.
*/
export declare function coerceElement<T>(elementOrRef: ElementRef<T> | T): T;