import { find } from "lodash" ; import { UI5Class } from "@ui5-language-assistant/semantic-model-types" ; import { ui5NodeToFQN } from "./ui5-node-to-fqn" ; import { getSuperClasses } from "./get-super-class" ; function isSubClass ( superClassFqn , clazz ) { if ( clazz === undefined ) { return false ; } const superClasses = getSuperClasses ( clazz ) ; return ( find ( superClasses , ( _ ) => ui5NodeToFQN ( _ ) === superClassFqn ) !== undefined ) ; } export function isElementSubClass ( clazz ) { return isSubClass ( "sap.ui.core.Element" , clazz ) ; }