FortAwesome / Font-Awesome

The iconic SVG, font, and CSS toolkit
https://fontawesome.com
Other
73.61k stars 12.2k forks source link

Add parameter to dom.insertCss in Typescript definition #15637

Open tomyam1 opened 5 years ago

tomyam1 commented 5 years ago

Describe the bug The Typescript definition of dom.insertCss doesn't allow the css parameter.

To Reproduce

https://github.com/FortAwesome/Font-Awesome/blob/5c06ed077887b54064d3cb32cd7b6150cf21ca15/js-packages/%40fortawesome/fontawesome-svg-core/index.d.ts#L106

API refrence: https://fontawesome.com/how-to-use/with-the-api/methods/dom-insertcss

This is not a duplicate of https://github.com/FortAwesome/Font-Awesome/issues/12133 which was for another issue in the TS definition that got fixed

Temporary fix:

// Fix for https://github.com/FortAwesome/Font-Awesome/issues/15637
declare module '@fortawesome/fontawesome-svg-core' {
    interface DOM {
        insertCss(css: string): string;
    }
}
tagliala commented 4 years ago

Hi!

Thanks for being part of the Font Awesome Community, thanks for reporting this, and sorry if I've missed this request.

Let's assign @mlwilkerson