chore: resolve eslint warnings in packages/mermaid/src/diagrams/class/classDb.ts

This commit is contained in:
Sidharth Vinod
2025-04-19 10:21:44 +05:30
parent 5e20087252
commit b52f5058c9

View File

@@ -41,7 +41,7 @@ export class ClassDB implements DiagramDB {
private namespaces = new Map<string, NamespaceNode>();
private namespaceCounter = 0;
private functions: any[] = [];
private functions: ((element: Element) => void)[] = [];
constructor() {
this.functions.push(this.setupToolTips.bind(this));
@@ -477,7 +477,7 @@ export class ClassDB implements DiagramDB {
let tooltipElem: Selection<HTMLDivElement, unknown, HTMLElement, unknown> =
select('.mermaidTooltip');
// @ts-expect-error - Incorrect types
if ((tooltipElem._groups || tooltipElem)[0][0] === null) {
if ((tooltipElem._groups ?? tooltipElem)[0][0] === null) {
tooltipElem = select('body')
.append('div')
.attr('class', 'mermaidTooltip')