The stricter checking applies to all function types, except those originating in method or constructor declarations. Methods are excluded specifically to ensure generic classes and interfaces (such as Array) continue to mostly relate covariantly.
https://www.typescriptlang.org/docs/handbook/relea...
<svg>
. Либо попробовать прикрутить такой костыль на onload
<object type="image/svg+xml" class="sf" data="/wp-content/uploads/2023/vk.svg" onload="this.getSVGDocument().documentElement.classList = this.classList; this.replaceWith(this.getSVGDocument().documentElement)" width="48" height="48"></object>
document.addEventListener("click", outsideClick, true)