0

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>'.

gatsbyz
  • 1,057
  • 1
  • 10
  • 26
AHOYAHOY
  • 1,856
  • 4
  • 24
  • 34

1 Answers1

2

You can fix this by installing

npm i --save-dev @types/styled-jsx

It was tracked under this issue: https://github.com/zeit/styled-jsx/issues/90

edouardr
  • 116
  • 7