1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

Property does not exist on type 'JSX.IntrinsicElements'

Discussão em 'Angular' iniciado por Rifa Fatima, Outubro 16, 2024.

  1. Rifa Fatima

    Rifa Fatima Guest

    I have an angular library that has a react component inside it. I want my react component ABC to use an angular component XYZ using createCustomElement. The createCustomElement logic is inside an app module later and is not present in my library, I have added polyfills so that the ABC does not throw error and the build runs successfully. Before running the build, it shows no error, on hovering over <xyz></xyz> in abc.tsx file, it even displays that it is present JSX.IntrinsicElements["custom-element"]: any

    This is my polyfill code:

    declare global {

    namespace JSX {
    interface IntrinsicElements {

    "custom-element": any;
    }
    }
    }


    It is correctly added in my angular.json as well.

    How to resolve this issue so that my build runs successfully?

    Continue reading...

Compartilhe esta Página