【发布时间】:2019-03-04 14:59:18
【问题描述】:
我是 i18next 打字稿的新手,我想使用 withNamespaces 翻译一个 antd 表单
export default withNamespaces()(Form.create()(MyComponent));
这给了我以下错误:
Argument of type 'ComponentClass<RcBaseFormProps & Pick<any, string | number | symbol>, any>' is not assignable to parameter of type 'ComponentType<WithNamespaces>'.
Type 'ComponentClass<RcBaseFormProps & Pick<any, string | number | symbol>, any>' is not assignable to type 'ComponentClass<WithNamespaces, any>'.
Type 'RcBaseFormProps & Pick<any, string | number | symbol>' is missing the following properties from type 'WithNamespaces': tReady, i18n, t
这样做的正确方法是什么?谢谢。
【问题讨论】:
标签: reactjs typescript antd i18next