error TS2322: Type {} is not assignable to type ‘IntrinsicAttributes & IntrinsicClassAttributes

具体build报错

src/components/columnSelectorC/index.tsx(159,7): error TS2322: Type '{ useDragHandle: true; helperClass: string; onSortEnd: ({ oldIndex, newIndex }: { oldIndex: any; newIndex: any; }) => void; dataSource: any; className: string; renderItem: (value: string, index: any) => Element; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes> & Readonly<...>'.
3813[2022-11-01T22:11:34.955][CompileProject][INFO]   Property 'dataSource' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes> & Readonly<...>'.
3814[2022-11-01T22:11:34.955][CompileProject][INFO] src/components/columnSelectorC/index.tsx(165,12): error TS2322: Type '{ children: Element; index: any; className: string; key: any; extra: Element; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes> & Readonly<...>'.
3815[2022-11-01T22:11:34.955][CompileProject][INFO]   Property 'children' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes> & Readonly<...>'.
3816[2022-11-01T22:11:35.028][CompileProject][INFO] npm ERR! code ELIFECYCLE
3817[2022-11-01T22:11:35.028][CompileProject][INFO] npm ERR! errno 2

本地报错

error TS2322: Type {} is not assignable to type ‘IntrinsicAttributes & IntrinsicClassAttributes_第1张图片

定位问题

文件采用了.tsx的文件类型,缺少属性定义
在这里插入图片描述
这里直接定义了any属性,
error TS2322: Type {} is not assignable to type ‘IntrinsicAttributes & IntrinsicClassAttributes_第2张图片

你可能感兴趣的:(javascript,typescript)