SolidJSS
SolidJSโ€ข2y agoโ€ข
2 replies
p2

equivalent of React.detailedHTMLProps<T>?

Trying to use a webcomponent in my solid project. It says that to interface with React using typescript, I add this to my jsx:

declare global {
  namespace JSX {
    interface IntrinsicElements {
      'math-field': React.DetailedHTMLProps<React.HTMLAttributes<MathfieldElement>, MathfieldElement>;
    }
  }
}


What would the solid equivalent of this be? I have this which I hacked together from some other internet sources but It doesn't seem to be working:

declare module "solid-js" {
  namespace JSX {
    interface IntrinsicElements {
      'math-field': HTMLAttributes<MathfieldElement>;
    }
  }
}
Was this page helpful?