From: Alexander Ebert Date: Fri, 12 Aug 2022 14:47:05 +0000 (+0200) Subject: Add typing support for the icon elements X-Git-Tag: 6.0.0_Alpha_1~1024^2~3 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=452dcf846bc0b3dbdf6a9288ee1e0f10eb97dabf;p=GitHub%2FWoltLab%2FWCF.git Add typing support for the icon elements --- diff --git a/global.d.ts b/global.d.ts index 1d93f65962..251c2d10e3 100644 --- a/global.d.ts +++ b/global.d.ts @@ -56,12 +56,18 @@ declare global { interface FaBrand extends HTMLElement { name: string; size: IconSize; - setIcon: (name: string, isSolid: boolean) => void; } interface FaIcon extends HTMLElement { name: string; solid: boolean; size: IconSize; + + setIcon: (name: string, isSolid: boolean) => void; + } + + interface HTMLElementTagNameMap { + "fa-brand": FaBrand; + "fa-icon": FaIcon; } }