TS2345: Argument of type 'typeof SchemaRenderer' is not assignable to parameter of type 'ComponentType<SchemaRendererProps>'. Type 'typeof SchemaRenderer' is not assignable to type 'ComponentClass<SchemaRendererProps, any>'. #9824
用新版本得amis-editor yarn dev得时候报这个错误,帮忙看看什么原因导致的?
TS2345: Argument of type 'typeof SchemaRenderer' is not assignable to parameter of type 'ComponentType'.
Type 'typeof SchemaRenderer' is not assignable to type 'ComponentClass<SchemaRendererProps, any>'.
Types of property 'contextType' are incompatible.
Type 'React.Context | undefined' is not assignable to type 'import("D:\code\open_source\amis-editor-demo-master\node_modules\@types\react-router-dom\node_modules\@types\react\ts5.0\index").Context | undefined'.
Type 'React.Context' is not assignable to type 'import("D:\code\open_source\amis-editor-demo-master\node_modules\@types\react-router-dom\node_modules\@types\react\ts5.0\index").Context'.
The types of 'Provider.propTypes' are incompatible between these types.
Type 'React.WeakValidationMap<React.ProviderProps> | undefined' is not assignable to type 'import("D:\code\open_source\amis-editor-demo-master\node_modules\@types\react-router-dom\node_modules\@types\react\ts5.0\index").WeakValidationMapimport("D:\\code\\open_source\\amis-editor-demo-master\\node_modules\\@types\\react-router-dom\\node_modules\\@types\\react\\ts5.0\\index").ProviderProps<any>...'.
Type 'React.WeakValidationMap<React.ProviderProps>' is not assignable to type 'import("D:\code\open_source\amis-editor-demo-master\node_modules\@types\react-router-dom\node_modules\@types\react\ts5.0\index").WeakValidationMapimport("D:\\code\\open_source\\amis-editor-demo-master\\node_modules\\@types\\react-router-dom\\node_modules\\@types\\react\\ts5.0\\index").ProviderProps<any>'.
Types of property 'children' are incompatible.
Type 'React.Validator | undefined' is not assignable to type 'import("D:\code\open_source\amis-editor-demo-master\node_modules\@types\react-router-dom\node_modules\@types\react\ts5.0\index").Validatorimport("D:\\code\\open_source\\amis-editor-demo-master\\node_modules\\@types\\react-router-dom\\node_modules\\@types\\react\\ts5.0\\index").ReactNode | undefined'.
Type 'React.Validator' is not assignable to type 'import("D:\code\open_source\amis-editor-demo-master\node_modules\@types\prop-types\index").Validatorimport("D:\\code\\open_source\\amis-editor-demo-master\\node_modules\\@types\\react-router-dom\\node_modules\\@types\\react\\ts5.0\\index").ReactNode'.
Type 'React.ReactNode' is not assignable to type 'import("D:\code\open_source\amis-editor-demo-master\node_modules\@types\react-router-dom\node_modules\@types\react\ts5.0\index").ReactNode'.
Type '{}' is not assignable to type 'ReactNode'.
用新版本得amis-editor yarn dev得时候报这个错误,帮忙看看什么原因导致的? TS2345: Argument of type 'typeof SchemaRenderer' is not assignable to parameter of type 'ComponentType'.
Type 'typeof SchemaRenderer' is not assignable to type 'ComponentClass<SchemaRendererProps, any>'.
Types of property 'contextType' are incompatible.
Type 'React.Context | undefined' is not assignable to type 'import("D:\code\open_source\amis-editor-demo-master\node_modules\@types\react-router-dom\node_modules\@types\react\ts5.0\index").Context | undefined'.
Type 'React.Context' is not assignable to type 'import("D:\code\open_source\amis-editor-demo-master\node_modules\@types\react-router-dom\node_modules\@types\react\ts5.0\index").Context'.
The types of 'Provider.propTypes' are incompatible between these types.
Type 'React.WeakValidationMap<React.ProviderProps> | undefined' is not assignable to type 'import("D:\code\open_source\amis-editor-demo-master\node_modules\@types\react-router-dom\node_modules\@types\react\ts5.0\index").WeakValidationMapimport("D:\\code\\open_source\\amis-editor-demo-master\\node_modules\\@types\\react-router-dom\\node_modules\\@types\\react\\ts5.0\\index").ProviderProps<any>...'.
Type 'React.WeakValidationMap<React.ProviderProps>' is not assignable to type 'import("D:\code\open_source\amis-editor-demo-master\node_modules\@types\react-router-dom\node_modules\@types\react\ts5.0\index").WeakValidationMapimport("D:\\code\\open_source\\amis-editor-demo-master\\node_modules\\@types\\react-router-dom\\node_modules\\@types\\react\\ts5.0\\index").ProviderProps<any>'.
Types of property 'children' are incompatible.
Type 'React.Validator | undefined' is not assignable to type 'import("D:\code\open_source\amis-editor-demo-master\node_modules\@types\react-router-dom\node_modules\@types\react\ts5.0\index").Validatorimport("D:\\code\\open_source\\amis-editor-demo-master\\node_modules\\@types\\react-router-dom\\node_modules\\@types\\react\\ts5.0\\index").ReactNode | undefined'.
Type 'React.Validator' is not assignable to type 'import("D:\code\open_source\amis-editor-demo-master\node_modules\@types\prop-types\index").Validatorimport("D:\\code\\open_source\\amis-editor-demo-master\\node_modules\\@types\\react-router-dom\\node_modules\\@types\\react\\ts5.0\\index").ReactNode'.
Type 'React.ReactNode' is not assignable to type 'import("D:\code\open_source\amis-editor-demo-master\node_modules\@types\react-router-dom\node_modules\@types\react\ts5.0\index").ReactNode'.
Type '{}' is not assignable to type 'ReactNode'.