Linked Questions

Popular Questions

styled jsx for Inferno in typescript

Asked by At

How can I write definitions for Inferno.js

import 'react';

declare module 'react' {
  interface StyleHTMLAttributes<T> extends React.HTMLAttributes<T> {
    jsx?: boolean;
    global?: boolean;
  }
}

because

export const Footer = props =>
  <footer>
    <style jsx>{`{
      color: green;
    }`}</style>

  </footer>

causes an error.

[ts] Property 'jsx' does not exist on type 'DetailedHTMLProps, HTMLStyleElement>'.

Related Questions