在文件attributes-to-props.d.ts
的返回类型attributesToProps
功能是Object
与String
项目。
但是在attributesToProps
函数中,调用setStyleProp
将CSSInline
为StyleObject
。
函数的返回是StyleObject
而不是String
。
如果您想获得CSSProperty
则此错误输入的结果是错误。
更新attributes-to-props.d.ts
为:
export type Attributes = Record<string, string>;
export type Props = Record<string, string> & {
style: Record<string, string>;
};
感谢您创建此问题@EoleO。 你想开PR吗?
@EoleO请查看 #245
感谢您的响应
@EoleO当然,如果您仍然遇到问题,请随时重新打开。