【发布时间】:2018-07-17 09:25:35
【问题描述】:
如何为 Inferno.js 编写定义
import 'react';
declare module 'react' {
interface StyleHTMLAttributes<T> extends React.HTMLAttributes<T> {
jsx?: boolean;
global?: boolean;
}
}
因为
export const Footer = props =>
<footer>
<style jsx>{`{
color: green;
}`}</style>
</footer>
导致错误。
[ts] 类型“DetailedHTMLProps, HTMLStyleElement>”上不存在属性“jsx”。
【问题讨论】:
标签: typescript typescript-typings next.js infernojs